]> git.eshelyaron.com Git - emacs.git/commitdiff
Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect-window' non-nil
authorMartin Rudalics <rudalics@gmx.at>
Tue, 14 Nov 2017 09:09:24 +0000 (10:09 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 14 Nov 2017 09:09:24 +0000 (10:09 +0100)
* lisp/mouse.el (mouse-drag-and-drop-region): Ignore
'select-window' events to make it work with
'mouse-autoselect-window'.

lisp/mouse.el

index 5eeee1ec52c213f2d77b09641d55600af565c6b1..545a7ff2a021ad8b73f00c23bcc1304fbcc4b878 100644 (file)
@@ -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))