Yank active region with middle-click yank

* eat.el (eat-mouse-yank-primary): Select active region if
'select-active-regions' is non-nil.
This commit is contained in:
Akib Azmain Turja 2023-05-15 22:36:01 +06:00
parent f01afd6c24
commit d85744b48a
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

3
eat.el
View file

@ -5108,6 +5108,9 @@ STRING and ARG are passed to `yank-pop', which see."
EVENT is the mouse event."
(interactive "e")
(when select-active-regions
(let (select-active-regions)
(deactivate-mark)))
(unless (windowp (posn-window (event-start event)))
(error "Position not in text area of window"))
(select-window (posn-window (event-start event)))