Fix #4882: ffap lookup handler triggers twice

Also, fall back to counsel-file-jump before ffap.
This commit is contained in:
Henrik Lissner 2021-04-17 23:25:35 -04:00
parent 6e49cb5ce2
commit d7de9118e8

View file

@ -262,7 +262,8 @@ current buffer."
"Uses `find-file-at-point' to read file at point."
(require 'ffap)
(when (ffap-guesser)
(find-file-at-point)))
(find-file-at-point)
t))
(defun +lookup-bug-reference-backend-fn (_identifier)
"Searches for a bug reference in user/repo#123 or #123 format and opens it in
@ -369,7 +370,11 @@ Otherwise, falls back on `find-file-at-point'."
((stringp path) (find-file-at-point path))
((call-interactively #'find-file-at-point))))
((featurep! :completion ivy)
(counsel-file-jump (thing-at-point 'filename t)
(doom-project-root)))
((ffap-prompter (thing-at-point 'filename t)))))
;;