From cb908779a9814f8d74379f168425b32b26de5621 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 7 Nov 2019 09:56:45 +0100 Subject: [PATCH] Editor: always paint complete line when painting current line highlight If the paint event rect does not contain the complete line, request an update with the full line width also for editable editors. This fixes current line highlight issues in the commit reword editor. Change-Id: I6b93230a47bdd61248c1aa9631208606cbbae7c8 Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 80bbe1323b4..84b947f4009 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4334,7 +4334,7 @@ void TextEditorWidgetPrivate::paintCurrentLineHighlight(const PaintEventData &da QColor color = m_document->fontSettings().toTextCharFormat(C_CURRENT_LINE).background().color(); // set alpha, otherwise we cannot see block highlighting and find scope underneath color.setAlpha(128); - if (!data.isEditable && !data.eventRect.contains(lineRect.toRect())) { + if (!data.eventRect.contains(lineRect.toRect())) { QRect updateRect = data.eventRect; updateRect.setLeft(0); updateRect.setRight(data.viewportRect.width() - int(data.offset.x()));