Commit d0cf4f2c authored by Guido van Rossum's avatar Guido van Rossum

Hmm... Tim didn't turn "replace all" into a single undo block.

I think I like it better if it os, so here.
parent 96be61b0
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment