From 3b86448a0ab79c7ccf3b5585d924e809a983abf8 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 4 Sep 2025 21:36:54 +0200 Subject: [PATCH] Fixed issue #2133 (crash in editor search&replace) --- src/lay/lay/layMacroEditorPage.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lay/lay/layMacroEditorPage.cc b/src/lay/lay/layMacroEditorPage.cc index e90c42fff..a56540deb 100644 --- a/src/lay/lay/layMacroEditorPage.cc +++ b/src/lay/lay/layMacroEditorPage.cc @@ -1401,9 +1401,9 @@ MacroEditorPage::replace_in_selection (const QString &replace, bool first) // restore selection which might have changed due to insert c.setPosition (anchor_at_end ? be.position () + pe : bs.position () + ps); c.setPosition (!anchor_at_end ? be.position () + pe : bs.position () + ps, QTextCursor::KeepAnchor); + mp_text->setTextCursor (c); } - mp_text->setTextCursor (c); c.endEditBlock (); }