summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-08 13:06:07 (GMT)
committerGuido van Rossum <guido@python.org>1999-06-08 13:06:07 (GMT)
commitab6a08a4b6e4a12339cb33e4cd14fdf8426c346b (patch)
tree762f1e88713c2a36081ddcff0a6da042e228860f /Tools
parent9745f5a74f1e97ab5c3bcf754bbda920166deb62 (diff)
downloadcpython-ab6a08a4b6e4a12339cb33e4cd14fdf8426c346b.zip
cpython-ab6a08a4b6e4a12339cb33e4cd14fdf8426c346b.tar.gz
cpython-ab6a08a4b6e4a12339cb33e4cd14fdf8426c346b.tar.bz2
Hmm... Tim didn't turn "replace all" into a single undo block.
I think I like it better if it os, so here.
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 813de48..e29d4d6 100644
--- a/Tools/idle/ReplaceDialog.py
+++ b/Tools/idle/ReplaceDialog.py
@@ -82,6 +82,7 @@ class ReplaceDialog(SearchDialogBase):
ok = 1
first = last = None
# XXX ought to replace circular instead of top-to-bottom when wrapping
+ text.undo_block_start()
while 1:
res = self.engine.search_forward(text, prog, line, col, 0, ok)
if not res:
@@ -103,6 +104,7 @@ class ReplaceDialog(SearchDialogBase):
text.insert(first, new)
col = i + len(new)
ok = 0
+ text.undo_block_stop()
if first and last:
self.show_hit(first, last)
self.close()