aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-09-07 08:00:33 +0000
committernyamatongwe <devnull@localhost>2001-09-07 08:00:33 +0000
commit912e86ac5b4c2d049805861f34934d73702c9e01 (patch)
tree630d8feed1058b3b09e6111387fefdfe9298b2d6 /src
parentbcf72c2b70ed57332f6f020f1c47df9a6f20060c (diff)
downloadscintilla-mirror-912e86ac5b4c2d049805861f34934d73702c9e01.tar.gz
Deleting 0 characters has no effect - no notification or undo action.
This prevents SetLineIndentation from often requiring three steps to undo.
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx4
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();