aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-07-30 11:32:02 +0300
committerEli Zaretskii2016-09-23 17:01:42 +0300
commitf746a92c3c6d12c09ae07ec24a4a1199aa7a0364 (patch)
tree3181fef2aa928c5d1e116619da937e3776f29334
parentdf4f8125342bafe1d70130f84acfa67cc0c4a7f4 (diff)
downloademacs-f746a92c3c6d12c09ae07ec24a4a1199aa7a0364.tar.gz
emacs-f746a92c3c6d12c09ae07ec24a4a1199aa7a0364.zip
Fix region display while dragging mouse
* lisp/mouse.el (mouse-drag-track): Reset deactivate-mark in the buffer of the drag event, to allow mark to be set and the region be shown as we drag the mouse. (Bug#24030) This was backported from master (cherry picked from commit 7d58b02f363ab02961faa950d1ba727df96f2f19)
-rw-r--r--lisp/mouse.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index d0694007d56..699225277de 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -808,14 +808,16 @@ The region will be defined with mark and point."
808 (setq mouse-selection-click-count-buffer (current-buffer)) 808 (setq mouse-selection-click-count-buffer (current-buffer))
809 (deactivate-mark) 809 (deactivate-mark)
810 (let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541). 810 (let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541).
811 (start-posn (event-start start-event))
812 (start-point (posn-point start-posn))
813 (start-window (posn-window start-posn))
814 (_ (with-current-buffer (window-buffer start-window)
815 (setq deactivate-mark nil)))
811 ;; We've recorded what we needed from the current buffer and 816 ;; We've recorded what we needed from the current buffer and
812 ;; window, now let's jump to the place of the event, where things 817 ;; window, now let's jump to the place of the event, where things
813 ;; are happening. 818 ;; are happening.
814 (_ (mouse-set-point start-event)) 819 (_ (mouse-set-point start-event))
815 (echo-keystrokes 0) 820 (echo-keystrokes 0)
816 (start-posn (event-start start-event))
817 (start-point (posn-point start-posn))
818 (start-window (posn-window start-posn))
819 (bounds (window-edges start-window)) 821 (bounds (window-edges start-window))
820 (make-cursor-line-fully-visible nil) 822 (make-cursor-line-fully-visible nil)
821 (top (nth 1 bounds)) 823 (top (nth 1 bounds))