QScintilla/Editor.py

changeset 3863
472eb955ff9c
parent 3861
9489d1c4639d
child 3865
425bce508cf4
diff -r 9489d1c4639d -r 472eb955ff9c QScintilla/Editor.py
--- a/QScintilla/Editor.py	Sat Oct 11 19:08:00 2014 +0200
+++ b/QScintilla/Editor.py	Sun Oct 12 16:17:30 2014 +0200
@@ -216,6 +216,7 @@
         self.acAPI = False
         
         self.__lastEditPosition = None
+        self.__annotationLines = 0
         
         # list of clones
         self.__clones = []
@@ -1948,7 +1949,9 @@
             vsb = self.verticalScrollBar()
             vsbMax = vsb.maximum()
             vsbValue = vsb.value()
-            vsb.setMaximum(vsbMax + annotationLinesAdded)
+            self.__annotationLines += annotationLinesAdded
+            vsb.setMaximum(max(self.lines() + self.__annotationLines - 
+                               self.linesOnScreen(), 0))
             if vsbValue == vsbMax:
                 vsb.setValue(vsb.maximum())
         

eric ide

mercurial