Skip to content

Commit

Permalink
Don't strip invisible text when formatting hover string
Browse files Browse the repository at this point in the history
This was introduced in joaotavora#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.

Fixes joaotavora#865.

* eglot.el (eglot--format-markup): Don't use
'filter-buffer-substring'; instead, keep invisible text.
  • Loading branch information
astoff committed Mar 9, 2022
1 parent d03235f commit ecec4f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,9 @@ 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))))))
(goto-char (point-min))
(skip-chars-forward " \t\n\r")
(buffer-substring (point) (point-max)))))

(define-obsolete-variable-alias 'eglot-ignored-server-capabilites
'eglot-ignored-server-capabilities "1.8")
Expand Down

0 comments on commit ecec4f7

Please sign in to comment.