lib/textbringer/commands/replace.rb in textbringer-0.1.8 vs lib/textbringer/commands/replace.rb in textbringer-0.1.9
- old
+ new
@@ -53,12 +53,13 @@
replace_match(to_str)
n += 1
when ?n
# do nothing
when ?!
- replace_match(to_str)
- n += 1 + Buffer.current.replace_regexp_forward(regexp, to_str)
- Buffer.current.merge_undo(2)
+ Buffer.current.composite_edit do
+ replace_match(to_str)
+ n += 1 + Buffer.current.replace_regexp_forward(regexp, to_str)
+ end
break
when ?q
break
when ?.
replace_match(to_str)