aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-07-28 01:04:59 +0000
committernyamatongwe <devnull@localhost>2007-07-28 01:04:59 +0000
commite035be19cd3c4a94aa7217aa2f87421cfb5832d2 (patch)
tree282922c5f7d193ce9868c6483169871f2a9121eb /src
parentb7f72ac95550a9246877b72c155ae042262198ba (diff)
downloadscintilla-mirror-e035be19cd3c4a94aa7217aa2f87421cfb5832d2.tar.gz
Fixed potential but unlikely unpaired undo group.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 9562bd4cc..77e74c75e 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5666,8 +5666,10 @@ int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) {
length = istrlen(text);
if (replacePatterns) {
text = pdoc->SubstituteByPosition(text, &length);
- if (!text)
+ if (!text) {
+ pdoc->EndUndoAction();
return 0;
+ }
}
if (targetStart != targetEnd)
pdoc->DeleteChars(targetStart, targetEnd - targetStart);