]> code.delx.au - gnu-emacs/blobdiff - lisp/mouse.el
* test/lisp/help-fns-tests.el: Add several tests for 'describe-function'.
[gnu-emacs] / lisp / mouse.el
index 0be17b48cacaceaa460bf502b1fabcc881f3c1c2..8d727536e05e018b9b390006508d475697eff544 100644 (file)
@@ -575,7 +575,12 @@ command alters the kill ring or not."
   (mouse-minibuffer-check click)
   (select-window (posn-window (event-start click)))
   (let ((beg (posn-point (event-start click)))
-       (end (posn-point (event-end click)))
+        (end
+         (if (eq (posn-window (event-end click)) (selected-window))
+             (posn-point (event-end click))
+           ;; If the mouse ends up in any other window or on the menu
+           ;; bar, use `window-point' of selected window (Bug#23707).
+           (window-point)))
         (click-count (event-click-count click)))
     (let ((drag-start (terminal-parameter nil 'mouse-drag-start)))
       (when drag-start