From b1ee4d200a95cb742fb0fc70b17be70034031ff8 Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Sat, 11 Jan 2025 17:06:54 +0000 Subject: [PATCH] Return nil from passthrough-try-completion when table is nil --- lsp-completion.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lsp-completion.el b/lsp-completion.el index d0a5059c29..3bef6141a4 100644 --- a/lsp-completion.el +++ b/lsp-completion.el @@ -850,9 +850,10 @@ The return is nil or in range of (0, inf)." "Disable LSP completion support." (lsp-completion-mode -1)) -(defun lsp-completion-passthrough-try-completion (string _table _pred point) +(defun lsp-completion-passthrough-try-completion (string table _pred point) "Passthrough try function, always return the passed STRING and POINT." - (cons string point)) + (when table + (cons string point))) (defun lsp-completion-passthrough-all-completions (_string table pred _point) "Passthrough all completions from TABLE with PRED."