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/Editor.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Editor.cxx') 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 -- cgit v1.2.3