QScintilla/MiniEditor.py

changeset 6359
e78be0616e6e
parent 6247
5c677a7f7d51
child 6645
ad476851d7e0
diff -r 1a274e1ef9c0 -r e78be0616e6e QScintilla/MiniEditor.py
--- a/QScintilla/MiniEditor.py	Wed Jun 20 18:34:44 2018 +0200
+++ b/QScintilla/MiniEditor.py	Wed Jun 20 18:45:07 2018 +0200
@@ -3335,6 +3335,20 @@
         self.__textEdit.setModified(False)
         self.setWindowModified(False)
     
+    def gotoLine(self, line, pos=1):
+        """
+        Public slot to jump to the beginning of a line.
+        
+        @param line line number to go to
+        @type int
+        @keyparam pos position in line to go to
+        @type int
+        """
+        self.__textEdit.setCursorPosition(line - 1, pos - 1)
+        self.__textEdit.ensureLineVisible(line - 1)
+        self.__textEdit.setFirstVisibleLine(line - 1)
+        self.__textEdit.ensureCursorVisible()
+    
     #######################################################################
     ## Methods implementing the interface to EditorConfig
     #######################################################################

eric ide

mercurial