branch: externals/eglot
commit a2d1fc9c3c8a04072699713e8697cdeb92b2a4c7
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
Fix #625: handle null reply for textDocument/definition
* eglot.el (eglot--lsp-xrefs-for-method): Handle null response
from textDocument/definition & friends.
---
eglot.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 13fe74a..851f2e6 100644
--- a/eglot.el
+++ b/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."