]> granicus.if.org Git - python/commitdiff
Hmm... Tim didn't turn "replace all" into a single undo block.
authorGuido van Rossum <guido@python.org>
Tue, 8 Jun 1999 13:06:07 +0000 (13:06 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 8 Jun 1999 13:06:07 +0000 (13:06 +0000)
I think I like it better if it os, so here.

Tools/idle/ReplaceDialog.py

index 813de48bfa1941f2c9d0bfaf5c82731e99d8b040..e29d4d6f0b4c279acc19311893eaff65ffc938c9 100644 (file)
@@ -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()