emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 ff7bd84: Make 'mouse-drag-and-drop-region' work w


From: Martin Rudalics
Subject: [Emacs-diffs] emacs-26 ff7bd84: Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil
Date: Tue, 14 Nov 2017 04:10:10 -0500 (EST)

branch: emacs-26
commit ff7bd84b233888257b4b71214eb0a372168d0bae
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>

    Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' 
non-nil
    
    * lisp/mouse.el (mouse-drag-and-drop-region): Ignore
    'select-window' events to make it work with
    'mouse-autoselect-window'.
---
 lisp/mouse.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5eeee1e..545a7ff 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2380,7 +2380,9 @@ is copied instead of being cut."
       ;; When event was click instead of drag, skip loop
       (while (progn
                (setq event (read-event))
-               (mouse-movement-p event))
+               (or (mouse-movement-p event)
+                   ;; Handle `mouse-autoselect-window'.
+                   (eq (car event) 'select-window)))
         (unless value-selection ; initialization
           (delete-overlay mouse-secondary-overlay)
           (setq value-selection (buffer-substring start end))



reply via email to

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