Fixed issue #2133 (crash in editor search&replace)

This commit is contained in:
Matthias Koefferlein 2025-09-04 21:36:54 +02:00
parent 70ba27c8f2
commit 3b86448a0a
1 changed files with 1 additions and 1 deletions

View File

@ -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 ();
}