aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2008-08-03 11:18:52 +0000
committernyamatongwe <unknown>2008-08-03 11:18:52 +0000
commit63928c8719f3e2643851f141e3c7562d9ba97bef (patch)
tree8f37c3f8048c3c534eec7a852e8788a04b9a83ea /src
parent0881d794162d9590bf6c3c44e096b06453c6cc58 (diff)
downloadscintilla-mirror-63928c8719f3e2643851f141e3c7562d9ba97bef.tar.gz
ClearDocumentStyle clears all indicators in case the lexer has used an
indicator.
Diffstat (limited to 'src')
-rw-r--r--src/Decoration.cxx8
-rw-r--r--src/Decoration.h2
-rw-r--r--src/Editor.cxx1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/Decoration.cxx b/src/Decoration.cxx
index e4ac0e07c..0e5b4a09a 100644
--- a/src/Decoration.cxx
+++ b/src/Decoration.cxx
@@ -101,6 +101,14 @@ void DecorationList::Delete(int indicator) {
}
}
+void DecorationList::ClearAll() {
+ for (Decoration *deco=root; deco; deco = deco->next) {
+ int position = 0;
+ int length = deco->rs.Length();
+ deco->rs.FillRange(position, 0, length);
+ }
+}
+
void DecorationList::SetCurrentIndicator(int indicator) {
currentIndicator = indicator;
current = DecorationFromIndicator(indicator);
diff --git a/src/Decoration.h b/src/Decoration.h
index 2809641af..5c02aa7be 100644
--- a/src/Decoration.h
+++ b/src/Decoration.h
@@ -39,6 +39,8 @@ public:
DecorationList();
~DecorationList();
+ void ClearAll();
+
void SetCurrentIndicator(int indicator);
int GetCurrentIndicator() { return currentIndicator; }
diff --git a/src/Editor.cxx b/src/Editor.cxx
index c72fc96d0..372f03ea9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3497,6 +3497,7 @@ void Editor::ClearDocumentStyle() {
pdoc->SetStyleFor(pdoc->Length(), 0);
cs.ShowAll();
pdoc->ClearLevels();
+ pdoc->decorations.ClearAll();
}
void Editor::CopyAllowLine() {