aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-13 15:12:59 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-13 15:12:59 +1000
commit3a92b46e366fa0b537201396d59c2dccfd09088e (patch)
tree39fbe576068d641e4c935c5631b4d5e0d0b97672 /src/PositionCache.cxx
parenta00831b266b81c6a6b89cc06bad32f1490d8650b (diff)
downloadscintilla-mirror-3a92b46e366fa0b537201396d59c2dccfd09088e.tar.gz
Backport: When line end characters are displayed, indicators are drawn under/over them.
Backport of changeset 6934:c0ca57c954c8.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r--src/PositionCache.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index e2dd69e3a..543573b38 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) {