[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24755: 25.1; Selection continues with no mouse button pressed
From: |
Stefan Monnier |
Subject: |
bug#24755: 25.1; Selection continues with no mouse button pressed |
Date: |
Wed, 26 Oct 2016 15:29:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
> Stefan, could you please fix this? It seems to be due to changes in
> how mouse-drag-track handles mouse events: in Emacs 24.5, the code
> handled mouse clicks as well, whereas now it doesn't seem to. So
> releasing the mouse button while Ctrl or Shift is pressed signals an
> error now, instead of finishing the drag event.
> The fix should go to the emacs-25 branch.
I pushed the patch below to emacs-25, which should fix it.
Stefan
diff --git a/lisp/subr.el b/lisp/subr.el
index 573f238..07909b8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4507,8 +4507,10 @@ set-transient-map
;; exit C-u.
t)
((eq t keep-pred)
- (eq this-command
- (lookup-key map (this-command-keys-vector))))
+ (let ((mc (lookup-key map (this-command-keys-vector))))
+ ;; If the key is unbound `this-command` is
+ ;; nil and so is `mc`.
+ (and mc (eq this-command mc))))
(t (funcall keep-pred)))
(funcall exitfun)))))
(add-hook 'pre-command-hook clearfun)
- bug#24755: 25.1; Selection continues with no mouse button pressed, Mats Palmgren, 2016/10/21
- bug#24755: 25.1; Selection continues with no mouse button pressed, Eli Zaretskii, 2016/10/22
- bug#24755: 25.1; Selection continues with no mouse button pressed,
Stefan Monnier <=
- bug#24755: 25.1; Selection continues with no mouse button pressed, Eli Zaretskii, 2016/10/26
- bug#24755: 25.1; Selection continues with no mouse button pressed, Stefan Monnier, 2016/10/26
- bug#24755: 25.1; Selection continues with no mouse button pressed, Mats Palmgren, 2016/10/26
- bug#24755: 25.1; Selection continues with no mouse button pressed, Stefan Monnier, 2016/10/26
- bug#24755: 25.1; Selection continues with no mouse button pressed, Mats Palmgren, 2016/10/26