Ignore down-mouse-1 and down-mouse-3 events in popup

This commit is contained in:
Akib Azmain Turja 2022-06-27 18:50:54 +06:00
parent 8914cfc360
commit ed13f14a37
No known key found for this signature in database
GPG Key ID: 5535FCF54D88616B
1 changed files with 3 additions and 1 deletions

View File

@ -66,6 +66,8 @@
(corfu-complete)))
(define-key map [mouse-1] mouse-1)
(define-key map [mouse-3] mouse-3)
(define-key map [down-mouse-1] #'ignore)
(define-key map [down-mouse-3] #'ignore)
map))
(defun corfu-mouse--format-candidates (fcands)
@ -122,7 +124,7 @@ FCANDS is the return value of `corfu--format-candidates'."
triple-mouse-4 triple-mouse-5))
(continue-commands '("corfu-mouse--on-mouse-1"
"corfu-mouse--on-mouse-3"
mwheel-scroll mouse-drag-region)))
mwheel-scroll)))
(cond
(corfu-mouse-mode
(advice-add #'corfu--format-candidates :filter-return