aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-07-18 04:24:17 +0000
committernyamatongwe <devnull@localhost>2000-07-18 04:24:17 +0000
commitdee236ce71b0ce4795a6d2773f47b4075c283d8c (patch)
treec9dd9ac27e358fb20930d015a573172171d9c6c7 /src/Editor.cxx
parent0fcb749581b4806a6dba56eb7edb6ceb961ab08e (diff)
downloadscintilla-mirror-dee236ce71b0ce4795a6d2773f47b4075c283d8c.tar.gz
Added functions to clear all styling and contraction.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index e7e415c7b..118bc42d2 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1502,6 +1502,13 @@ void Editor::ClearAll() {
SetVerticalScrollPos();
}
+void Editor::ClearDocumentStyle() {
+ pdoc->StartStyling(0, '\377');
+ pdoc->SetStyleFor(pdoc->Length(), 0);
+ cs.ShowAll();
+ pdoc->ClearLevels();
+}
+
void Editor::Cut() {
Copy();
ClearSelection();
@@ -3347,7 +3354,11 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
ClearAll();
return 0;
- case SCI_SETUNDOCOLLECTION:
+ case SCI_CLEARDOCUMENTSTYLE:
+ ClearDocumentStyle();
+ return 0;
+
+ case SCI_SETUNDOCOLLECTION:
pdoc->SetUndoCollection(wParam);
return 0;