Commit dfdf63ac authored by Marko Bencun's avatar Marko Bencun

vr/mc-mark: ignore regexp subgroups

Before, each subgroup resulted in a new cursor, overlapping with the one
from the main match. This is probably not desired.
parent df781200
......@@ -783,14 +783,15 @@ visible all the time in the minibuffer."
(deactivate-mark nil)
(first-fake-cursor nil))
(vr--feedback-function (vr--get-regexp-string) t nil (lambda (i j begin end)
(with-current-buffer vr--target-buffer
(goto-char end)
(push-mark begin)
;; temporarily enable transient mark mode
(activate-mark)
(let ((fc (mc/create-fake-cursor-at-point)))
(unless first-fake-cursor
(setq first-fake-cursor fc))))))
(when (zerop j)
(with-current-buffer vr--target-buffer
(goto-char end)
(push-mark begin)
;; temporarily enable transient mark mode
(activate-mark)
(let ((fc (mc/create-fake-cursor-at-point)))
(unless first-fake-cursor
(setq first-fake-cursor fc)))))))
;; one fake cursor too many, replace first one with
;; the regular cursor.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment