Merge pull request #2142 from KLayout/bugfix/issue-2133

Fixed issue #2133 (crash in editor search&replace)
This commit is contained in:
Matthias Köfferlein 2025-09-06 13:25:15 +02:00 committed by GitHub
commit 5df264e720
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 ();
}