From dac3643de6a3b9dca1397c43ea0951b32ef2746e Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sun, 21 Jun 2020 21:28:05 +0200 Subject: [PATCH] Fixed bug in search replace --- nw/gui/doceditor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()