diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index b932b42c..09e4f5e4 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -1237,10 +1237,10 @@ class GuiDocEditor(QTextEdit): self._beginSearch() return + theCursor = self.textCursor() if not theCursor.hasSelection(): return - theCursor = self.textCursor() searchFor = self.docSearch.getSearchText() replWith = self.docSearch.getReplaceText() selText = theCursor.selectedText()