aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2007-07-28 01:04:59 +0000
committernyamatongwe <unknown>2007-07-28 01:04:59 +0000
commitbb8f5a8c443f3ceb01fe178f0201e6635d7fd7f6 (patch)
tree282922c5f7d193ce9868c6483169871f2a9121eb
parente13fe2a9bd6b82063ab7ee70d3de68832a972040 (diff)
downloadscintilla-mirror-bb8f5a8c443f3ceb01fe178f0201e6635d7fd7f6.tar.gz
Fixed potential but unlikely unpaired undo group.
-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);