]> git.eshelyaron.com Git - emacs.git/commit
Rework computation of string given to eldoc (again)
authorAndrii Kolomoiets <andreyk.mad@gmail.com>
Wed, 6 May 2020 19:06:35 +0000 (22:06 +0300)
committerJoão Távora <joaotavora@gmail.com>
Mon, 25 May 2020 10:39:13 +0000 (11:39 +0100)
commit43f9294773a9d8928d179c7a4d206a312b869a90
treeb5dd0af39746152e6ac4a249bfb0fb981689aa22
parentb2dd04ddbe94b5a10884fd01a8309a0ea8f6b887
Rework computation of string given to eldoc (again)

Co-authored-by: Andreii Kolomoiets <andreyk.mad@gmail.com>
Also do some refactoring to join similar logic in
eglot-doc-too-large-for-echo-area and eglot--truncate-string.

* eglot.el (eglot-doc-too-large-for-echo-area): Now returns the
number of lines available.
(eglot--truncate-string): New helper.
(eglot--first-line-of-doc, eglot--top-lines-of-doc): Remove.
(eglot--update-doc): Use new helpers.

* eglot-tests.el (hover-multiline-doc-locus): New test

GitHub-reference: close https://github.com/joaotavora/eglot/issues/459
lisp/progmodes/eglot.el