From 30a42acd9f04fea654c99f6c18ddbb26e5deb4b2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 1 Jan 2007 23:34:58 +0000 Subject: Major change to CellBuffer class with addition of Partitioning class and SplitVector template. Inserting and deleting lines are made more efficient by lessening the amount of per line information copied. Marker data is only allocated for each line if markers are added. --- src/Document.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index e530b0423..2e21cfe7b 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -14,6 +14,8 @@ #include "Scintilla.h" #include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" #include "CellBuffer.h" #include "CharClassify.h" #include "Document.h" @@ -858,7 +860,7 @@ int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) { while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) pos--; } else { - if (!onlyWordCharacters) + if (!onlyWordCharacters && pos < Length()) ccStart = WordCharClass(cb.CharAt(pos)); while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) pos++; -- cgit v1.2.3