summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-07-30 11:32:02 +0300
committerEli Zaretskii <eliz@gnu.org>2016-07-30 11:32:02 +0300
commit7d58b02f363ab02961faa950d1ba727df96f2f19 (patch)
treebe855fe58df3f28cde96e2442c051afe0c3189bf /lisp/mouse.el
parentd81dc05258963d88725a684a6fb1d6ee07eaca1f (diff)
downloademacs-7d58b02f363ab02961faa950d1ba727df96f2f19.tar.gz
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)
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 75b13c4409c..4b4749bb45d 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -832,14 +832,16 @@ The region will be defined with mark and point."
(setq mouse-selection-click-count-buffer (current-buffer))
(deactivate-mark)
(let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541).
+ (start-posn (event-start start-event))
+ (start-point (posn-point start-posn))
+ (start-window (posn-window start-posn))
+ (_ (with-current-buffer (window-buffer start-window)
+ (setq deactivate-mark nil)))
;; We've recorded what we needed from the current buffer and
;; window, now let's jump to the place of the event, where things
;; are happening.
(_ (mouse-set-point start-event))
(echo-keystrokes 0)
- (start-posn (event-start start-event))
- (start-point (posn-point start-posn))
- (start-window (posn-window start-posn))
(bounds (window-edges start-window))
(make-cursor-line-fully-visible nil)
(top (nth 1 bounds))