Fixed an issue in the editor related to not re-initializing the online change tracer after a file has been refreshed (reread after an external change).

Sun, 04 Nov 2012 10:40:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 04 Nov 2012 10:40:43 +0100
changeset 2189
5149cec53130
parent 2188
82446745442b
child 2190
abd65b78425e

Fixed an issue in the editor related to not re-initializing the online change tracer after a file has been refreshed (reread after an external change).

QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Sun Nov 04 10:11:21 2012 +0100
+++ b/QScintilla/Editor.py	Sun Nov 04 10:40:43 2012 +0100
@@ -2426,6 +2426,14 @@
             self.__onlineChangeTraceTimerTimeout)
         self.textChanged.connect(self.__resetOnlineChangeTraceTimer)
         
+    def __reinitOnlineChangeTrace(self):
+        """
+        Private slot to re-initialize the online change trace.
+        """
+        self.__oldText = self.text()
+        self.__lastSavedText = self.text()
+        self.__deleteAllChangeMarkers()
+        
     def __resetOnlineChangeTraceTimer(self):
         """
         Private method to reset the online syntax check timer.
@@ -5774,6 +5782,9 @@
             self.lastModified = QDateTime.currentDateTime()
         self.setModified(False)
         
+        # re-initialize the online change tracer
+        self.__reinitOnlineChangeTrace()
+        
         # reset cursor position
         self.setCursorPosition(cline, cindex)
         self.ensureCursorVisible()

eric ide

mercurial