Fix funny behaviour when pasting. basically we should start but not end a cursor edit block.

This commit is contained in:
James Graham
2026-02-26 19:25:01 +00:00
parent c3ea0db82d
commit 611374d4dd

View File

@@ -400,7 +400,6 @@ void ChatKeyHelper::checkMouseSelection()
return; return;
} }
bool selectingLink = false; bool selectingLink = false;
cursor.beginEditBlock();
cursor.setPosition(m_textItem->selectionStart()); cursor.setPosition(m_textItem->selectionStart());
if (cursor.charFormat().isAnchor()) { if (cursor.charFormat().isAnchor()) {
selectingLink = true; selectingLink = true;
@@ -428,7 +427,6 @@ void ChatKeyHelper::checkMouseSelection()
cursor.movePosition(QTextCursor::PreviousCharacter); cursor.movePosition(QTextCursor::PreviousCharacter);
currentCharFormat = cursor.charFormat(); currentCharFormat = cursor.charFormat();
} }
cursor.endEditBlock();
selectRight(cursor); selectRight(cursor);
} }