From 52f7a04838a037a2dd19976a632d18a4d21fb84a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 19 Jul 2021 22:47:33 +0200 Subject: [PATCH] Fixed #867 (macro editor freeze after search next) --- src/lay/lay/layMacroEditorPage.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lay/lay/layMacroEditorPage.cc b/src/lay/lay/layMacroEditorPage.cc index 7ca4bf85d..4d0226a4f 100644 --- a/src/lay/lay/layMacroEditorPage.cc +++ b/src/lay/lay/layMacroEditorPage.cc @@ -1104,6 +1104,10 @@ MacroEditorPage::find_next () } QTextCursor c = mp_text->textCursor (); + if (c.isNull ()) { + c = QTextCursor (mp_text->document ()); + mp_text->setTextCursor (c); + } bool first = true; for (QTextBlock b = c.block (); true; ) {