From: João Távora Date: Fri, 24 Feb 2023 10:46:20 +0000 (+0000) Subject: Eglot: fix inlay hint with label collection instead of string X-Git-Tag: emacs-29.0.90~335 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6;p=emacs.git Eglot: fix inlay hint with label collection instead of string Reported by Chinmay Dalal * lisp/progmodes/eglot.el (eglot--update-hints-1): Fix bug when inlay hint contains collection of labels. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 9d722047b47..e20d209332d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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 " "))