aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Editor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index fa54c2f72..fbf44883c 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2319,7 +2319,9 @@ void Editor::ClearAll() {
if (0 != pdoc->Length()) {
pdoc->DeleteChars(0, pdoc->Length());
}
- cs.Clear();
+ if (!pdoc->IsReadOnly()) {
+ cs.Clear();
+ }
pdoc->EndUndoAction();
anchor = 0;
currentPos = 0;