GNU bug report logs -
#24755
25.1; Selection continues with no mouse button pressed
Previous Next
Reported by: Mats Palmgren <matspal <at> gmail.com>
Date: Fri, 21 Oct 2016 15:36:02 UTC
Severity: normal
Found in version 25.1
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#24755: 25.1; Selection continues with no mouse button pressed
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 24755 <at> debbugs.gnu.org.
--
24755: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24755
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> 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)
[Message part 3 (message/rfc822, inline)]
1. Visit a buffer with some text
2. Press the left mouse button
3. Drag the mouse to select some text
4. Press the Control key
5. Release the mouse button
6. Continue to move the mouse
Actual Result:
Moving the mouse continues to select text, even though no mouse button
or keys are pressed.
Expected Result:
Selection should stop at 5.
Unfortunately, it's fairly common for me to do 4 before 5 (in
preparation for deleting the selection with C-w for example) so
version 25 is unusable for me with this bug. This is a new
behavior in v25, it's not present in v23 or earlier versions
that I've used.
In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.1 LTS
Thanks,
Mats
This bug report was last modified 8 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.