ProjectController.py
changeset 1579 418e6bac22e8
parent 1574 ce9c0e68389c
child 1581 2295fdc5c271
--- a/ProjectController.py	Thu Nov 24 18:33:56 2016 +0300
+++ b/ProjectController.py	Mon Nov 28 16:12:27 2016 +0300
@@ -1080,8 +1080,14 @@
     def ShowError(self, logger, from_location, to_location):
         chunk_infos = self.GetChunkInfos(from_location, to_location)
         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)
+            row = 1 if from_location[0] < start_row else (from_location[0] - start_row)            
+            col = 1 if (start_row != from_location[0]) else (from_location[1] - start_col)
+            start = (row, col)
+
+            row = 1 if to_location[0] < start_row else (to_location[0] - start_row)            
+            col = 1 if (start_row != to_location[0]) else (to_location[1] - start_col)
+            end = (row, col)
+            
             if self.AppFrame is not None:
                 self.AppFrame.ShowError(infos, start, end)