1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Improve hs-indicator-mouse-toggle-hiding for non-selected windows

* lisp/progmodes/hideshow.el (hs-indicator-mouse-toggle-hiding):
Use 'mouse-set-point' to select the clicked window when it was not selected.
This commit is contained in:
Juri Linkov 2025-11-17 09:34:36 +02:00
parent ec08011af4
commit 1668290c9d

View file

@ -1388,6 +1388,8 @@ Argument E should be the event that triggered this action."
(interactive "e")
(hs-life-goes-on
(when hs-show-indicators
(when (mouse-event-p event)
(mouse-set-point event))
(let* ((overlays (save-excursion
(goto-char (posn-point (event-end event)))
(overlays-in (pos-bol) (pos-eol))))