aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-01-01 23:34:58 +0000
committernyamatongwe <devnull@localhost>2007-01-01 23:34:58 +0000
commit30a42acd9f04fea654c99f6c18ddbb26e5deb4b2 (patch)
tree7ec27fd7c4ca3664e5ead3fb122a5aa87c713f41 /src/Editor.cxx
parentebf5266f9fdadabb7c3545fd08e4520004cfb100 (diff)
downloadscintilla-mirror-30a42acd9f04fea654c99f6c18ddbb26e5deb4b2.tar.gz
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.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index b2d29da13..b0bd99e83 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -19,6 +19,8 @@
#include "ContractionState.h"
#include "SVector.h"
+#include "SplitVector.h"
+#include "Partitioning.h"
#include "CellBuffer.h"
#include "KeyMap.h"
#include "Indicator.h"
@@ -1915,6 +1917,7 @@ static bool IsSpaceOrTab(char ch) {
LineLayout *Editor::RetrieveLineLayout(int lineNumber) {
int posLineStart = pdoc->LineStart(lineNumber);
int posLineEnd = pdoc->LineStart(lineNumber + 1);
+ PLATFORM_ASSERT(posLineEnd >= posLineStart);
int lineCaret = pdoc->LineFromPosition(currentPos);
return llc.Retrieve(lineNumber, lineCaret,
posLineEnd - posLineStart, pdoc->GetStyleClock(),
@@ -1930,6 +1933,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
if (!ll)
return;
PLATFORM_ASSERT(line < pdoc->LinesTotal());
+ PLATFORM_ASSERT(ll->chars != NULL);
int posLineStart = pdoc->LineStart(line);
int posLineEnd = pdoc->LineStart(line + 1);
// If the line is very long, limit the treatment to a length that should fit in the viewport