Skip to content

Commit 2523987

Browse files
authored
completion-exit-fn: remove unnecessary trigger self-insert-command (#2238)
1 parent 677a37b commit 2523987

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lsp-completion.el

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,12 @@ The MARKERS and PREFIX value will be attached to each candidate."
487487
:company-doc-buffer (-compose #'company-doc-buffer
488488
#'lsp-completion--get-documentation)
489489
:exit-function
490-
(-rpartial #'lsp-completion--exit-fn trigger-chars candidates)))))
490+
(-rpartial #'lsp-completion--exit-fn candidates)))))
491491

492-
(defun lsp-completion--exit-fn (candidate _status &optional trigger-chars candidates)
492+
(defun lsp-completion--exit-fn (candidate _status &optional candidates)
493493
"Exit function of `completion-at-point'.
494494
CANDIDATE is the selected completion item.
495-
Others: TRIGGER-CHARS CANDIDATES"
495+
Others: CANDIDATES"
496496
(unwind-protect
497497
(-let* ((candidate (if (plist-member (text-properties-at 0 candidate)
498498
'lsp-completion-item)
@@ -545,10 +545,7 @@ Others: TRIGGER-CHARS CANDIDATES"
545545
(lsp-feature? "textDocument/signatureHelp"))
546546
(lsp-signature-activate))
547547

548-
(setq-local lsp-inhibit-lsp-hooks nil)
549-
550-
(when (lsp-completion--looking-back-trigger-characterp trigger-chars)
551-
(setq this-command 'self-insert-command)))
548+
(setq-local lsp-inhibit-lsp-hooks nil))
552549
(lsp-completion--clear-cache)))
553550

554551
(defun lsp-completion--regex-fuz (str)

0 commit comments

Comments
 (0)