emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 d59bcbc: Handle mouse leaving initial window in `


From: Martin Rudalics
Subject: [Emacs-diffs] emacs-25 d59bcbc: Handle mouse leaving initial window in `mouse-set-region' (Bug#23707)
Date: Thu, 9 Jun 2016 08:13:27 +0000 (UTC)

branch: emacs-25
commit d59bcbc00bc70f101492a80ea48964b2dd5d337d
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>

    Handle mouse leaving initial window in `mouse-set-region' (Bug#23707)
    
    * lisp/mouse.el (mouse-set-region): If the mouse ends up in
    another window or on the menu bar, use `window-point' of
    selected window instead of `posn-point' of the event end
    (Bug#23707).
---
 lisp/mouse.el |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 592338a..64ee796 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -566,7 +566,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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]