diff options
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 10403242b..abbb87d5d 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -357,8 +357,10 @@ void Document::ModifiedAt(int pos) { // Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number void Document::DeleteChars(int pos, int len) { + if (len == 0) + return; if ((pos + len) > Length()) - return ; + return; if (cb.IsReadOnly() && enteredReadOnlyCount == 0) { enteredReadOnlyCount++; NotifyModifyAttempt(); |