diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index bf320549de1..4a6eda6c2c4 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -134,8 +134,10 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co int x = line.cursorToX(pos); lineRect.setLeft(x - borderWidth); lineRect.setRight(x + borderWidth); + lineRect.setBottom(lineRect.bottom() + borderWidth); QPainterPath path; path.addRect(lineRect); + path.translate(offset); return path; }