mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(mouse-drag-region): Unread the up-event rather than execute it here.
This commit is contained in:
parent
135c9ca6b8
commit
c2ef83b424
1 changed files with 3 additions and 2 deletions
|
|
@ -449,12 +449,13 @@ release the mouse button. Otherwise, it does not."
|
|||
;; In the case of a multiple click, it gives the wrong results,
|
||||
;; because it would fail to set up a region.
|
||||
(if (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun))
|
||||
;; In this case, we can just let the up-event execute normally.
|
||||
(progn
|
||||
(setq this-command fun)
|
||||
;; Delete the overlay before calling the function,
|
||||
;; because delete-overlay increases buffer-modified-tick.
|
||||
(delete-overlay mouse-drag-overlay)
|
||||
(funcall fun event))
|
||||
(setq unread-command-events
|
||||
(cons event unread-command-events)))
|
||||
(if (not (= (overlay-start mouse-drag-overlay)
|
||||
(overlay-end mouse-drag-overlay)))
|
||||
(let (last-command this-command)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue