diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Document.cxx | 5 | 
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,  | 
