diff options
author | nyamatongwe <devnull@localhost> | 2009-06-10 10:54:57 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-06-10 10:54:57 +0000 |
commit | 8b064ce4521a34da81beefe5c7b7743825a90b45 (patch) | |
tree | 36aad6126ec7825e48a4387c1dae29bbd53ec86c /src/PerLine.cxx | |
parent | 1dbec24d4f23053d0efa1c10ebb7fcafacea5ca4 (diff) | |
download | scintilla-mirror-8b064ce4521a34da81beefe5c7b7743825a90b45.tar.gz |
Clear out per-line data when all contents removed.
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r-- | src/PerLine.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 466d2fb31..5408c0258 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -125,6 +125,10 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { } LineMarkers::~LineMarkers() { + Init(); +} + +void LineMarkers::Init() { for (int line = 0; line < markers.Length(); line++) { delete markers[line]; markers[line] = 0; @@ -227,6 +231,10 @@ void LineMarkers::DeleteMarkFromHandle(int markerHandle) { LineLevels::~LineLevels() { } +void LineLevels::Init() { + levels.DeleteAll(); +} + void LineLevels::InsertLine(int line) { if (levels.Length()) { int level = SC_FOLDLEVELBASE; @@ -281,6 +289,10 @@ int LineLevels::GetLevel(int line) { LineState::~LineState() { } +void LineState::Init() { + lineStates.DeleteAll(); +} + void LineState::InsertLine(int line) { if (lineStates.Length()) { lineStates.EnsureLength(line); @@ -339,6 +351,10 @@ LineAnnotation::~LineAnnotation() { ClearAll(); } +void LineAnnotation::Init() { + ClearAll(); +} + void LineAnnotation::InsertLine(int line) { if (annotations.Length()) { annotations.Insert(line, 0); |