From 30f4bacfe06eb177307585e54398a8ac7288448b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 7 Sep 2001 08:00:33 +0000 Subject: Deleting 0 characters has no effect - no notification or undo action. This prevents SetLineIndentation from often requiring three steps to undo. --- src/Document.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3