]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't error if server replies with empty hover message
authorJoão Távora <joaotavora@gmail.com>
Sat, 18 Aug 2018 11:26:55 +0000 (12:26 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 18 Aug 2018 11:26:55 +0000 (12:26 +0100)
* eglot.el (eglot-eldoc-function): Check non-nil contents.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/74

lisp/progmodes/eglot.el

index 6f3676117a7153e335dbdc8eb9104b0b58a47a8d..3fd98c7d80093e422bca0900960d7a550d3b006c 100644 (file)
@@ -1512,7 +1512,9 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp."
          :success-fn (jsonrpc-lambda (&key contents range)
                        (unless sig-showing
                          (when-buffer-window
-                          (when-let (info (eglot--hover-info contents range))
+                          (when-let (info (and contents
+                                               (eglot--hover-info contents
+                                                                  range)))
                             (eldoc-message info)))))
          :deferred :textDocument/hover))
       (when (eglot--server-capable :documentHighlightProvider)