Editor: ensure cursor is visible after handling backspace

Fixes: QTCREATORBUG-28316
Change-Id: I1e8c9229704c700ad76f6906b1a220948c819c1b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
David Schulz
2022-10-17 06:45:38 +02:00
parent 890b85d17e
commit 93c15f48dc

View File

@@ -2673,9 +2673,10 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e)
if (cursor.hasSelection()) {
cursor.removeSelectedText();
setMultiTextCursor(cursor);
return;
} else {
d->handleBackspaceKey();
}
d->handleBackspaceKey();
ensureCursorVisible();
return;
}
break;