summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2023-02-24 10:46:20 +0000
committerJoão Távora <joaotavora@gmail.com>2023-02-24 10:47:45 +0000
commit5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6 (patch)
tree4d59f7a6c5ea1f40a682cf6733251166e4953082
parent573d9675fd74fc50f70b3bc64f24f838f799a8aa (diff)
downloademacs-5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6.tar.gz
emacs-5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6.tar.bz2
emacs-5db75ec7d30d5cf5dc610382ca25bd5a5c4f8fb6.zip
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.
-rw-r--r--lisp/progmodes/eglot.el3
1 files changed, 2 insertions, 1 deletions
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 " "))