From 93cbf54609909591af1bb864e12beda4141a4d89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 24 Feb 2021 11:27:59 +0000 Subject: [PATCH] Handle null reply for textdocument/definition * eglot.el (eglot--lsp-xrefs-for-method): Handle null response from textDocument/definition & friends. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/625 --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 13fe74a9057..851f2e68ef9 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2008,7 +2008,7 @@ Try to visit the target file for a richer summary line." (eglot--lambda ((Location) uri range) (collect (eglot--xref-make-match (symbol-name (symbol-at-point)) uri range))) - (if (vectorp response) response (list response)))))) + (if (vectorp response) response (and response (list response))))))) (cl-defun eglot--lsp-xref-helper (method &key extra-params capability ) "Helper for `eglot-find-declaration' & friends." -- 2.39.2