From dee236ce71b0ce4795a6d2773f47b4075c283d8c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 18 Jul 2000 04:24:17 +0000 Subject: Added functions to clear all styling and contraction. --- src/Editor.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/Editor.cxx') 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; -- cgit v1.2.3