diff options
author | Guido van Rossum <guido@python.org> | 1999-06-08 12:54:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-06-08 12:54:56 (GMT) |
commit | 9745f5a74f1e97ab5c3bcf754bbda920166deb62 (patch) | |
tree | 13019e26ba4ec84cea6c799eeb6bfa6cf6272f69 /Tools/idle | |
parent | 0fcd635d418d444b2f64da7695f4d48b8bf637bd (diff) | |
download | cpython-9745f5a74f1e97ab5c3bcf754bbda920166deb62.zip cpython-9745f5a74f1e97ab5c3bcf754bbda920166deb62.tar.gz cpython-9745f5a74f1e97ab5c3bcf754bbda920166deb62.tar.bz2 |
Tim Peters: made replacement atomic for undo/redo.
Diffstat (limited to 'Tools/idle')
-rw-r--r-- | Tools/idle/ReplaceDialog.py | 2 |
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 |