Neil Hodgson wrote:
   The intention is that the caret line gets its own entry so that it
is kept cached when scrolled out of view. I haven't looked closely at
the code recently, so there could be bugs there.

Here's a patch that puts the caret line in element 0 of the array and the rest of the lines starting at element 1. length was already being allocated to at least lines on screen + 1.

John
Index: Editor.cxx
===================================================================
RCS file: /home/cvs/src/ide/external/scintilla/src/Editor.cxx,v
retrieving revision 1.13
diff -u -p -u -r1.13 Editor.cxx
--- Editor.cxx  22 Aug 2005 21:41:54 -0000      1.13
+++ Editor.cxx  23 Aug 2005 01:06:30 -0000
@@ -275,9 +275,9 @@ LineLayout *LineLayoutCache::Retrieve(in
                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;
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to