Index: src/render/katerenderer.cpp =================================================================== --- src/render/katerenderer.cpp +++ src/render/katerenderer.cpp @@ -560,10 +560,14 @@ currentViewLine = range->viewLineForColumn(cursor->column()); } + bool foobar = (currentViewLine >= 0) ? true : false; + paintTextLineBackground(paint, range, currentViewLine, xStart, xEnd); if (range->layout()) { bool drawSelection = m_view && m_view->selection() && showSelections() && m_view->selectionRange().overlapsLine(range->line()); + foobar = foobar || drawSelection; + // Draw selection in block selection mode. We need 2 kinds of selections that QTextLayout::draw can't render: // - past-end-of-line selection and // - 0-column-wide selection (used to indicate where text will be typed) @@ -706,7 +710,7 @@ } // draw tab stop indicators - if (showTabs()) { + if (showTabs() || foobar) { int tabIndex = text.indexOf(tabChar, line.lineLayout().xToCursor(xStart)); while (tabIndex != -1 && tabIndex < line.endCol()) { int x = line.lineLayout().cursorToX(tabIndex); @@ -719,7 +723,7 @@ } // draw trailing spaces - if (showSpaces() != KateDocumentConfig::None) { + if ((showSpaces() != KateDocumentConfig::None) || foobar) { int spaceIndex = line.endCol() - 1; const int trailingPos = showSpaces() == KateDocumentConfig::All ? 0 : qMax(range->textLine()->lastChar(), 0); @@ -743,7 +747,7 @@ } } - if (showNonPrintableSpaces()) { + if (showNonPrintableSpaces() || foobar) { const int y = lineHeight() * i + fm.ascent(); static const QRegularExpression nonPrintableSpacesRegExp(QStringLiteral("[\\x{2000}-\\x{200F}\\x{2028}-\\x{202F}\\x{205F}-\\x{2064}\\x{206A}-\\x{206F}]"));