aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-05-31 01:43:09 +0000
committernyamatongwe <devnull@localhost>2001-05-31 01:43:09 +0000
commit2403091f1bff3fce7d417d8cf5f3516606cdb42c (patch)
treea2b3bb18486e58fde4c3f2a3e6d3cf6a07c75b25 /src/Document.cxx
parent60a13138a59178b32e77162fff6aaaff1f4beb93 (diff)
downloadscintilla-mirror-2403091f1bff3fce7d417d8cf5f3516606cdb42c.tar.gz
Fixed bug where highlighting was not performed when last character
of document deleted.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 1ea2da012..20f8286d4 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -378,7 +378,10 @@ void Document::DeleteChars(int pos, int len) {
const char *text = cb.DeleteChars(pos * 2, len * 2);
if (startSavePoint && cb.IsCollectingUndo())
NotifySavePoint(!startSavePoint);
- ModifiedAt(pos);
+ if (pos < Length())
+ ModifiedAt(pos);
+ else
+ ModifiedAt(pos-1);
NotifyModified(
DocModification(
SC_MOD_DELETETEXT | SC_PERFORMED_USER,