Changeset View
Changeset View
Standalone View
Standalone View
src/render/katerenderer.cpp
Show First 20 Lines • Show All 718 Lines • ▼ Show 20 Line(s) | 718 | if (showTrailingSpaces()) { | |||
---|---|---|---|---|---|
719 | int spaceIndex = line.endCol() - 1; | 719 | int spaceIndex = line.endCol() - 1; | ||
720 | int trailingPos = range->textLine()->lastChar(); | 720 | int trailingPos = range->textLine()->lastChar(); | ||
721 | if (trailingPos < 0) { | 721 | if (trailingPos < 0) { | ||
722 | trailingPos = 0; | 722 | trailingPos = 0; | ||
723 | } | 723 | } | ||
724 | if (spaceIndex >= trailingPos) { | 724 | if (spaceIndex >= trailingPos) { | ||
725 | while (spaceIndex >= line.startCol() && text.at(spaceIndex).isSpace()) { | 725 | while (spaceIndex >= line.startCol() && text.at(spaceIndex).isSpace()) { | ||
726 | if (text.at(spaceIndex) != QLatin1Char('\t') || !showTabs()) { | 726 | if (text.at(spaceIndex) != QLatin1Char('\t') || !showTabs()) { | ||
727 | if (range->layout()->textOption().alignment() == Qt::AlignRight) { // Draw on left for RTL lines | ||||
728 | paintTrailingSpace(paint, line.lineLayout().cursorToX(spaceIndex) - xStart - spaceWidth() / 2.0, y); | ||||
729 | } else { | ||||
727 | paintTrailingSpace(paint, line.lineLayout().cursorToX(spaceIndex) - xStart + spaceWidth() / 2.0, y); | 730 | paintTrailingSpace(paint, line.lineLayout().cursorToX(spaceIndex) - xStart + spaceWidth() / 2.0, y); | ||
728 | } | 731 | } | ||
732 | } | ||||
729 | --spaceIndex; | 733 | --spaceIndex; | ||
730 | } | 734 | } | ||
731 | } | 735 | } | ||
732 | } | 736 | } | ||
733 | 737 | | |||
734 | if (showNonPrintableSpaces()) { | 738 | if (showNonPrintableSpaces()) { | ||
735 | const int y = lineHeight() * i + fm.ascent(); | 739 | const int y = lineHeight() * i + fm.ascent(); | ||
736 | 740 | | |||
▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines |