forked from qt-creator/qt-creator
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:
@@ -2673,9 +2673,10 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
if (cursor.hasSelection()) {
|
if (cursor.hasSelection()) {
|
||||||
cursor.removeSelectedText();
|
cursor.removeSelectedText();
|
||||||
setMultiTextCursor(cursor);
|
setMultiTextCursor(cursor);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
d->handleBackspaceKey();
|
d->handleBackspaceKey();
|
||||||
|
}
|
||||||
|
ensureCursorVisible();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user