diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index 8833dd4b329..1fce619e9ef 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -95,9 +95,7 @@ void TextEditorOverlay::addOverlaySelection(int begin, int end, selection.m_cursor_end = QTextCursor(document->docHandle(), end); if (overlaySelectionFlags & ExpandBegin) { - if (begin > 0 && begin < end) { // not empty - selection.m_cursor_begin.setKeepPositionOnInsert(true); - } + selection.m_cursor_begin.setKeepPositionOnInsert(true); } if (overlaySelectionFlags & LockSize)