kmacro-x

a fork of vifon's kmacro-x
git clone https://git.trogloxene.org/kmacro-x.git
Log | Files | Refs | README | LICENSE

commit d36093db6543c71e57f4830d9cf582cba3526aeb
parent aca829864a51ecbf608cc62624af26d89b176b38
Author: Wojciech Siewierski <wojciech@siewierski.eu>
Date:   Fri,  3 Mar 2023 17:56:39 +0100

Fix kmacro-x-mc-mark-at-click interacting with other overlays

Diffstat:
Mkmacro-x-mc-extra.el | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/kmacro-x-mc-extra.el b/kmacro-x-mc-extra.el @@ -46,12 +46,13 @@ Some code borrowed from `mc/toggle-cursor-on-click'." (select-window (posn-window position)) (let* ((point (posn-point position)) (overlays-at-point (overlays-at point))) - (if overlays-at-point - (dolist (ov overlays-at-point) - (when (eq (overlay-get ov 'face) 'kmacro-x-mc-cursor-face) - (delete-overlay ov) - (setq kmacro-x-mc-cursors - (delete ov kmacro-x-mc-cursors)))) + (unless (catch 'cursor + (dolist (ov overlays-at-point) + (when (eq (overlay-get ov 'face) 'kmacro-x-mc-cursor-face) + (delete-overlay ov) + (setq kmacro-x-mc-cursors + (delete ov kmacro-x-mc-cursors)) + (throw 'cursor ov)))) (let ((ov (make-overlay point (1+ point) nil t))) (unless kmacro-x-mc-mode (let ((kmacro-x-mc-mark-whole-symbol nil))