diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index 0e1b8862c2b..c6e1489d368 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -307,7 +307,7 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co } path.closeSubpath(); path.translate(offset); - return path; + return path.simplified(); } void TextEditorOverlay::paintSelection(QPainter *painter,