aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-07-25 02:45:37 +0000
committernyamatongwe <devnull@localhost>2007-07-25 02:45:37 +0000
commit340983e94342aaf907025ba84c32f7017ceed579 (patch)
tree8bfbeda92365295ea35c52ca32bf6ceb3df8f00a /src/PositionCache.cxx
parent5c8d9997e79ce61adbe653e639b7cfe22555a42d (diff)
downloadscintilla-mirror-340983e94342aaf907025ba84c32f7017ceed579.tar.gz
Fixed bugs where caret was not shown at start of wrapped lines or was shown
at both the start of one line and the end of the previous line.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r--src/PositionCache.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index 13140b779..354dddd1a 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -126,6 +126,11 @@ int LineLayout::LineLastVisible(int line) const {
}
}
+bool LineLayout::InLine(int offset, int line) const {
+ return ((offset >= LineStart(line)) && (offset < LineStart(line + 1)) ||
+ ((offset == numCharsInLine) && (line == (lines-1))));
+}
+
void LineLayout::SetLineStart(int line, int start) {
if ((line >= lenLineStarts) && (line != 0)) {
int newMaxLines = line + 20;