]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't strip invisible text when formatting hover string
authorAugusto Stoffel <arstoffel@gmail.com>
Thu, 10 Mar 2022 11:32:20 +0000 (12:32 +0100)
committerGitHub <noreply@github.com>
Thu, 10 Mar 2022 11:32:20 +0000 (11:32 +0000)
This was introduced in https://github.com/joaotavora/eglot/issues/482 due to a bad interaction with a specific
server.  But this solution makes hyperlinks in Eldoc buffers
unclickable, because the markdown-mode function that visits a link
relies on the invisible text.

Per https://github.com/joaotavora/eglot/issues/866

* eglot.el (eglot--format-markup): Use buffer-string instead of
filter-buffer-substring

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/865

lisp/progmodes/eglot.el

index 7bff005973a59a87a95d2ce5e5fb259e7b71eece..b84e1449d7457b3f3d829676148f0be6498dd48d 100644 (file)
@@ -1436,7 +1436,7 @@ Doubles as an indicator of snippet support."
            (message-log-max nil))
         (ignore-errors (delay-mode-hooks (funcall mode))))
       (font-lock-ensure)
-      (string-trim (filter-buffer-substring (point-min) (point-max))))))
+      (string-trim (buffer-string)))))
 
 (define-obsolete-variable-alias 'eglot-ignored-server-capabilites
   'eglot-ignored-server-capabilities "1.8")