Sat, 11 Oct 2014 19:08:00 +0200
Refined the last fix to maintain the scrollbar position.
(grafted from 9489d1c4639db502bbf3d9ab78e910cadc490fa7)
QScintilla/Editor.py | file | annotate | diff | comparison | revisions |
--- a/QScintilla/Editor.py Sat Oct 11 18:47:47 2014 +0200 +++ b/QScintilla/Editor.py Sat Oct 11 19:08:00 2014 +0200 @@ -1945,7 +1945,11 @@ self.inLinesChanged = False elif mtype & self.SC_MOD_CHANGEANNOTATION: vsb = self.verticalScrollBar() - vsb.setMaximum(vsb.maximum() + annotationLinesAdded) + vsbMax = vsb.maximum() + vsbValue = vsb.value() + vsb.setMaximum(vsbMax + annotationLinesAdded) + if vsbValue == vsbMax: + vsb.setValue(vsb.maximum()) def __restoreBreakpoints(self): """