Skip to content

Commit

Permalink
Fix out-of-bounds access (emacs-lsp#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiansturm committed Nov 4, 2020
1 parent 4cdb739 commit 466bf4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lsp-ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@
((&SymbolInformation :name :kind :container-name? :location (&Location :uri))
project-root)
"Convert the match returned by `lsp-mode` into a candidate string."
(let* ((type (elt lsp-ivy-symbol-kind-to-face kind))
(let* ((sanitized-kind (if (< kind (length lsp-ivy-symbol-kind-to-face)) kind 0))
(type (elt lsp-ivy-symbol-kind-to-face sanitized-kind))
(typestr (if lsp-ivy-show-symbol-kind
(propertize (format "[%s] " (car type)) 'face (cdr type))
""))
Expand Down

0 comments on commit 466bf4a

Please sign in to comment.