Add Search/Replace test

This commit is contained in:
Veronica K. B. Olsen
2020-09-21 22:07:21 +02:00
parent 191895507b
commit de3b35fa6d
2 changed files with 134 additions and 3 deletions
+3 -3
View File
@@ -423,10 +423,10 @@ class GuiDocEditor(QTextEdit):
return True
def getCursorPosition(self):
"""Find the cursor position in the document.
"""Find the cursor position in the document. If the editor has a
selection, return the position of the end of the selection.
"""
theCursor = self.textCursor()
return theCursor.position()
return self.textCursor().selectionEnd()
def setCursorLine(self, theLine):
"""Move the cursor to a given line in the document.