Changeset d4fc350ab1d2…
Parent eb514f9e9e6e…
by
Changes to one file · Browse files at d4fc350ab1d2 Showing diff from parent eb514f9e9e6e Diff from another changeset...
@@ -403,6 +403,17 @@ self.setCursorPosition(self.lines() - 1, len(self._prompt))
self.setReadOnly(False)
+ # make sure the prompt line is visible. Because QsciScintilla may
+ # delay line wrapping, setCursorPosition() doesn't always scrolls
+ # to the correct position.
+ # http://www.scintilla.org/ScintillaDoc.html#LineWrapping
+ self.SCN_PAINTED.connect(self._scrollCaretOnPainted)
+
+ @pyqtSlot()
+ def _scrollCaretOnPainted(self):
+ self.SCN_PAINTED.disconnect(self._scrollCaretOnPainted)
+ self.SendScintilla(self.SCI_SCROLLCARET)
+
@pyqtSlot()
def closePrompt(self):
"""Disable user input"""
|
Loading...