aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-08-29 00:57:12 +0000
committernyamatongwe <unknown>2005-08-29 00:57:12 +0000
commit203b397eb52cbdd7355e00006adb489780378307 (patch)
tree54f1a2520ae43772f3e50c0d2ee921f349d63bfc
parent6f9db586fced95ef34a1a60d7b1eb145bfaaf6a7 (diff)
downloadscintilla-mirror-203b397eb52cbdd7355e00006adb489780378307.tar.gz
Patch from John Ehresman to make page level layout caching handle the caret
line properly as a distinct entry.
-rw-r--r--src/Editor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 1c6579eed..a710170b5 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -275,9 +275,9 @@ LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChar
pos = 0;
} else if (level == llcPage) {
if (lineNumber == lineCaret) {
- pos = length;
+ pos = 0;
} else {
- pos = lineNumber % length;
+ pos = 1 + (lineNumber % (length - 1));
}
} else if (level == llcDocument) {
pos = lineNumber;