From 1d16d0504bc8dd49062ef7c451c7d4f68456b779 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sun, 15 Jul 2007 08:31:26 +0000 Subject: [PATCH] (mouse-drag-track): Reset transient-mark-mode to nil when handling the terminating event. --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0faca7d41bd..a18a61fe29b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-15 Martin Rudalics + + * mouse.el (mouse-drag-track): Reset transient-mark-mode to nil + when handling the terminating event. + 2007-07-15 Jeff Miller (tiny change) * calendar/cal-bahai.el (calendar-goto-bahai-date): Add autoload diff --git a/lisp/mouse.el b/lisp/mouse.el index 27b32e9f6f6..5577b94d01a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1013,6 +1013,11 @@ should only be used by mouse-drag-region." (overlay-start mouse-drag-overlay)) region-termination)) last-command this-command) + (when (eq transient-mark-mode 'identity) + ;; Reset `transient-mark-mode' to avoid expanding the region + ;; while scrolling (compare thread on "Erroneous selection + ;; extension ..." on bug-gnu-emacs from 2007-06-10). + (setq transient-mark-mode nil)) (push-mark region-commencement t t) (goto-char region-termination) (if (not do-mouse-drag-region-post-process) -- 2.39.2