Skip to content

Commit 466bf4a

Browse files
Fix out-of-bounds access (#19)
1 parent 4cdb739 commit 466bf4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lsp-ivy.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@
137137
((&SymbolInformation :name :kind :container-name? :location (&Location :uri))
138138
project-root)
139139
"Convert the match returned by `lsp-mode` into a candidate string."
140-
(let* ((type (elt lsp-ivy-symbol-kind-to-face kind))
140+
(let* ((sanitized-kind (if (< kind (length lsp-ivy-symbol-kind-to-face)) kind 0))
141+
(type (elt lsp-ivy-symbol-kind-to-face sanitized-kind))
141142
(typestr (if lsp-ivy-show-symbol-kind
142143
(propertize (format "[%s] " (car type)) 'face (cdr type))
143144
""))

0 commit comments

Comments
 (0)