Fixing bug in displaying lines of code at the origin of matiec errors
authorlaurent
Sun, 08 Jan 2012 19:10:12 +0100
changeset 661 5d3da49e8029
parent 660 56b536118ec8
child 662 037d2beecfb9
Fixing bug in displaying lines of code at the origin of matiec errors
plugger.py
--- a/plugger.py	Sun Jan 08 19:07:59 2012 +0100
+++ b/plugger.py	Sun Jan 08 19:10:12 2012 +0100
@@ -1193,6 +1193,7 @@
                     f = open(self._getIECcodepath())
 
                     for i, line in enumerate(f.readlines()):
+                        i = i + 1
                         if line[0] not in '\t \r\n':
                             last_section = line
 
@@ -1533,6 +1534,7 @@
         for infos, (start_row, start_col) in chunk_infos:
             start = (from_location[0] - start_row, from_location[1] - start_col)
             end = (to_location[0] - start_row, to_location[1] - start_col)
+            print from_location, to_location, start_row, start_col, start, end
             if self.AppFrame is not None:
                 self.AppFrame.ShowError(infos, start, end)