]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix region display while dragging mouse
authorEli Zaretskii <eliz@gnu.org>
Sat, 30 Jul 2016 08:32:02 +0000 (11:32 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 30 Jul 2016 08:32:02 +0000 (11:32 +0300)
* 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)

lisp/mouse.el

index 75b13c4409c66842bb1abfbcbea3e2e7331177a3..4b4749bb45d8600b7a5c74b9400cfa476cb08e82 100644 (file)
@@ -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))