Fix delete when selecting text

This commit is contained in:
James Graham
2026-01-25 19:03:34 +00:00
parent 39573c1650
commit 289c6c4f20

View File

@@ -128,7 +128,7 @@ bool ChatKeyHelper::deleteChar()
}
QTextCursor cursor = textItem->textCursor();
if (cursor.isNull()) {
if (cursor.isNull() || cursor.hasSelection()) {
return false;
}
if (cursor.position() >= textItem->document()->characterCount() - textItem->fixedEndChars().length() - 1) {