diff options
author | nyamatongwe <unknown> | 2007-01-01 23:34:58 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2007-01-01 23:34:58 +0000 |
commit | 9f6740c61ca15c172be2d5c04b672cd0eba7d0e4 (patch) | |
tree | 7ec27fd7c4ca3664e5ead3fb122a5aa87c713f41 /src/Editor.cxx | |
parent | c48897c8f67c8f4096fdb51269ec478b45694f7d (diff) | |
download | scintilla-mirror-9f6740c61ca15c172be2d5c04b672cd0eba7d0e4.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.cxx | 4 |
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 |