Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix out-of-bounds access (#19) #20

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

sebastiansturm
Copy link
Contributor

at least one language server (ccls) uses symbol kinds greater than 26 that, using the default value of lsp-ivy-symbol-kind-to-face, will trigger out-of-bounds errors (see issue #19). This PR avoids the issue by remapping anything beyond (length lsp-ivy-symbol-kind-to-face) to entry 0 (unknown - empty label).

Personally, I've never seen this issue so perhaps it's rare and the few (?) users who have run into it have for the most part decided to just resize their lsp-ivy-symbol-kind-to-face accordingly and fill in the interesting slots. Or perhaps this is a common issue and lsp-ivy-symbol-kind-to-face should be changed to an associative container to more conveniently extend to discontinuous value ranges as used by ccls. Opinions welcome

@sebastiansturm sebastiansturm merged commit e3c675b into emacs-lsp:master Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant