* lisp/mouse.el: Fix mouse-1-clock-follows-mouse = double

This functionality was broken by commit 3d5e31eceb,
the problem being that we end up considering as distinct the events
`down-double-mouse-1` and `double-down-mouse-1`.

Reported by Eyal Soha <eyalsoha@gmail.com>

(mouse--click-1-maybe-follows-link): Make sure the last element of
the list passed to `event-convert-list` is indeed a "basic" event.
This commit is contained in:
Stefan Monnier 2021-03-11 11:41:53 -05:00
parent c881e990e3
commit 02a5cfce47

View file

@ -116,7 +116,9 @@ Expects to be bound to `(double-)mouse-1' in `key-translation-map'."
(time-since (cdr mouse--last-down))
(/ (abs mouse-1-click-follows-link) 1000.0))))))
(eq (car mouse--last-down)
(event-convert-list (list 'down (car-safe last-input-event))))
(event-convert-list
`(down ,@(event-modifiers last-input-event)
,(event-basic-type last-input-event))))
(let* ((action (mouse-on-link-p (event-start last-input-event))))
(when (and action
(or mouse-1-click-in-non-selected-windows