don't lay cursors when repeating a replace

This commit is contained in:
Jean-Philippe Bernardy 2017-07-09 21:32:59 +02:00
parent 4b76f0a86c
commit 74cb03a0ea

View file

@ -291,10 +291,15 @@ If there is more than one, use mc/create-fake-cursor-at-point."
;; use markers so that deleting things does not mess the positions ;; use markers so that deleting things does not mess the positions
(boon-take-region regs) (boon-take-region regs)
(deactivate-mark t) (deactivate-mark t)
(if changes ; if we have a change to apply then we do not want to lay new cursors, just apply the changes.
(save-excursion
(dolist (reg markers)
(goto-char (boon-reg-point reg))
(boon/replay-changes changes)))
(boon-lay-multiple-cursors (lambda (reg) (boon-lay-multiple-cursors (lambda (reg)
(goto-char (boon-reg-point reg))) (goto-char (boon-reg-point reg)))
markers) markers)
(boon-insert changes))) (boon-insert changes))))
(defun boon-replace-by-character (replacement) (defun boon-replace-by-character (replacement)
"Replace the character at point by the REPLACEMENT character. "Replace the character at point by the REPLACEMENT character.