]> git.eshelyaron.com Git - emacs.git/commitdiff
Eglot: fix inlay hint with label collection instead of string
authorJoão Távora <joaotavora@gmail.com>
Fri, 24 Feb 2023 10:46:20 +0000 (10:46 +0000)
committerJoão Távora <joaotavora@gmail.com>
Fri, 24 Feb 2023 10:47:45 +0000 (10:47 +0000)
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.

lisp/progmodes/eglot.el

index 9d722047b478e9f1c8927c5d9b7ee16ea94eaf5f..e20d209332d0ffa6df8a11dfee30142eb3daa7ae 100644 (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 " "))