summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2017-11-14 10:09:24 +0100
committerMartin Rudalics <rudalics@gmx.at>2017-11-14 10:09:24 +0100
commitff7bd84b233888257b4b71214eb0a372168d0bae (patch)
tree834445761008c418816eea3307462662241623f5 /lisp/mouse.el
parent0491de8dad7b3e25e643f4556375a82b7e6ac445 (diff)
downloademacs-ff7bd84b233888257b4b71214eb0a372168d0bae.tar.gz
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'.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5eeee1ec52c..545a7ff2a02 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))