diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-13 15:12:59 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-13 15:12:59 +1000 |
commit | 0e3b1076abe9efe41952d12ab5dfb9de10fa1f88 (patch) | |
tree | f29daea86e2931311a1e6b10c1b3109117e67240 /src/PositionCache.cxx | |
parent | 69b556ea13124d67750c82c2a02d902ddaa78151 (diff) | |
download | scintilla-mirror-0e3b1076abe9efe41952d12ab5dfb9de10fa1f88.tar.gz |
When line end characters are displayed, indicators are drawn under/over them.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 8ed0580bb..680afbacd 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -104,18 +104,18 @@ int LineLayout::LineStart(int line) const { } } -int LineLayout::LineLastVisible(int line) const { +int LineLayout::LineLastVisible(int line, Scope scope) const { if (line < 0) { return 0; } else if ((line >= lines-1) || !lineStarts) { - return numCharsBeforeEOL; + return scope == Scope::visibleOnly ? numCharsBeforeEOL : numCharsInLine; } else { return lineStarts[line+1]; } } -Range LineLayout::SubLineRange(int subLine) const { - return Range(LineStart(subLine), LineLastVisible(subLine)); +Range LineLayout::SubLineRange(int subLine, Scope scope) const { + return Range(LineStart(subLine), LineLastVisible(subLine, scope)); } bool LineLayout::InLine(int offset, int line) const { @@ -218,7 +218,7 @@ Point LineLayout::PointFromPosition(int posInLine, int lineHeight, PointEnd pe) } for (int subLine = 0; subLine < lines; subLine++) { - const Range rangeSubLine = SubLineRange(subLine); + const Range rangeSubLine = SubLineRange(subLine, Scope::visibleOnly); if (posInLine >= rangeSubLine.start) { pt.y = static_cast<XYPOSITION>(subLine*lineHeight); if (posInLine <= rangeSubLine.end) { |