Commit 142c7672 authored by Karl Heuer's avatar Karl Heuer
Browse files

(mouse-kill): Select the clicked window first.

parent 25bef3dd
......@@ -380,7 +380,9 @@ This must be bound to a mouse click."
The text is saved in the kill ring, as with \\[kill-region]."
(interactive "e")
(mouse-minibuffer-check click)
(let ((click-posn (posn-point (event-start click))))
(let* ((posn (event-start click))
(click-posn (posn-point posn)))
(select-window (posn-window posn))
(if (numberp click-posn)
(kill-region (min (point) click-posn)
(max (point) click-posn)))))
......
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