From 5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 24 Feb 2023 10:46:20 +0000 Subject: [PATCH] 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. --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 " ")) -- 2.39.2