Tim Peters: made replacement atomic for undo/redo.
This commit is contained in:
parent
0fcd635d41
commit
9745f5a74f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue