]> Sergey Matveev's repositories - vim-lsp.git/commit
Use getbufoneline() where applicable
authorMagnus Groß <magnus@mggross.com>
Wed, 31 May 2023 21:44:24 +0000 (23:44 +0200)
committerMagnus Groß <magnus@mggross.com>
Wed, 31 May 2023 21:49:39 +0000 (23:49 +0200)
commit704f331a71057f62296f720de79b98bd02162c86
treeec9b364638db47525920bfc03aff09a67e737c13
parent352cb4a446d4a0eb1072202a4ff2dde861128c01
Use getbufoneline() where applicable

This has better performance than getbufline() and as a sideeffect also
fixes a rare issue where the LSP sends invalid data such that
getbufline() reads an empty list and causes the array access to get out
of bounds. With getbufoneline() this neatly falls back to returning the
empty string.
autoload/lsp/outline.vim
autoload/lsp/symbol.vim
autoload/lsp/textedit.vim
test/clangd_tests.vim