summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/ReplaceDialog.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/idle/ReplaceDialog.py b/Tools/idle/ReplaceDialog.py
index 3bff8b5..813de48 100644
--- a/Tools/idle/ReplaceDialog.py
+++ b/Tools/idle/ReplaceDialog.py
@@ -142,10 +142,12 @@ class ReplaceDialog(SearchDialogBase):
return 0
new = re.pcre_expand(m, self.replvar.get())
text.mark_set("insert", first)
+ text.undo_block_start()
if m.group():
text.delete(first, last)
if new:
text.insert(first, new)
+ text.undo_block_stop()
self.show_hit(first, text.index("insert"))
self.ok = 0
return 1