diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 688d231ad79..7f69768d288 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -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;