emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 4bd8773 23/54: Fix #339: fail when eglot-find-* f


From: João Távora
Subject: [elpa] externals/eglot 4bd8773 23/54: Fix #339: fail when eglot-find-* finds no references
Date: Thu, 16 Apr 2020 05:31:48 -0400 (EDT)

branch: externals/eglot
commit 4bd8773b7b4996d742a30caf8476c3e89121bca7
Author: Felicián Németh <address@hidden>
Commit: João Távora <address@hidden>

    Fix #339: fail when eglot-find-* finds no references
    
    * eglot.el (eglot--lsp-xref-helper): Display message when no
    references have been found instead of calling xref-find-references.
---
 eglot.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 7171911..c25b7b7 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1872,7 +1872,9 @@ Try to visit the target file for a richer summary line."
                                method
                                :extra-params extra-params
                                :capability capability)))
-    (xref-find-references "LSP identifier at point.")))
+    (if eglot--lsp-xref-refs
+        (xref-find-references "LSP identifier at point.")
+      (eglot--message "%s returned no references" method))))
 
 (defun eglot-find-declaration ()
   "Find declaration for SYM, the identifier at point."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]