Skip to content

Commit 7d22a49

Browse files
authored
lsp-try-completion: make it pass-through so the basic style works (#2405)
1 parent 0349a1c commit 7d22a49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lsp-completion.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,14 @@ The MARKERS and PREFIX value will be attached to each candidate."
470470
;; boundaries
471471
((equal (car-safe action) 'boundaries) nil)
472472
;; try-completion
473-
((null action) (cl-first (member probe (funcall candidates))))
473+
((null action)
474+
(when-let ((cands (funcall candidates)))
475+
(if (cl-rest cands) probe (cl-first cands))))
474476
;; test-completion: not return exact match so that the selection will
475477
;; always be shown
476478
((equal action 'lambda) nil)
477479
;; retrieve candidates
478-
(t (funcall candidates))))
480+
((equal action t) (funcall candidates))))
479481
:annotation-function #'lsp-completion--annotate
480482
:company-candidate-kind #'lsp-completion--candidate-kind
481483
:company-require-match 'never

0 commit comments

Comments
 (0)