Eglot: fix inlay hint with label collection instead of string

Reported by Chinmay Dalal <dalal.chinmay.0101@gmail.com>

* lisp/progmodes/eglot.el (eglot--update-hints-1): Fix bug when
inlay hint contains collection of labels.
This commit is contained in:
João Távora 2023-02-24 10:46:20 +00:00
parent 573d9675fd
commit 5db75ec7d3

View file

@ -3529,7 +3529,8 @@ If NOERROR, return predicate, else erroring function."
(let ((ov (make-overlay (point) (point)))
(left-pad (and paddingLeft (not (memq (char-before) '(32 9)))))
(right-pad (and paddingRight (not (memq (char-after) '(32 9)))))
(text (if (stringp label) label (plist-get label :value))))
(text (if (stringp label)
label (plist-get (elt label 0) :value))))
(overlay-put ov 'before-string
(propertize
(concat (and left-pad " ") text (and right-pad " "))