emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 f746a92 1/3: Fix region display while dragging mo


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 f746a92 1/3: Fix region display while dragging mouse
Date: Fri, 23 Sep 2016 14:06:24 +0000 (UTC)

branch: emacs-25
commit f746a92c3c6d12c09ae07ec24a4a1199aa7a0364
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/mouse.el |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/mouse.el b/lisp/mouse.el
index d069400..6992252 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -808,14 +808,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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]