emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#24755: closed (25.1; Selection continues with no m


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24755: closed (25.1; Selection continues with no mouse button pressed)
Date: Wed, 26 Oct 2016 19:31:02 +0000

Your message dated Wed, 26 Oct 2016 15:29:55 -0400
with message-id <address@hidden>
and subject line Re: bug#24755: 25.1; Selection continues with no mouse button 
pressed
has caused the debbugs.gnu.org bug report #24755,
regarding 25.1; Selection continues with no mouse button pressed
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24755: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24755
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.1; Selection continues with no mouse button pressed Date: Fri, 21 Oct 2016 16:56:00 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Thunderbird/49.0
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




--- End Message ---
--- Begin Message --- Subject: Re: 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)


--- End Message ---

reply via email to

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