From bb8f5a8c443f3ceb01fe178f0201e6635d7fd7f6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 28 Jul 2007 01:04:59 +0000 Subject: Fixed potential but unlikely unpaired undo group. --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3