Files
neovim/runtime/lua/vim
Mathias Fussenegger f3675337f0 fix(lsp): handle nil bytes in strings
Problem:

The LSP omnifunc can insert nil bytes, which when read in other places
(like semantic token) could cause an error:

    semantic_tokens.lua:304: Vim:E976: Using a Blob as a String

Solution:

Use `#line` instead of `vim.fn.strlen(line)`. Both return UTF-8 bytes
but the latter can't handle nil bytes.

Completion candidates can currently insert nil bytes, if other parts of
Alternative fix to https://github.com/neovim/neovim/pull/30359

Note that https://github.com/neovim/neovim/pull/30315 will avoid the
insertion of nil bytes from the LSP omnifunc, but the change of this PR
can more easily be backported.

(cherry picked from commit 8512f669f0)
2024-09-13 20:59:13 +00:00
..
2024-09-13 20:59:13 +00:00
2024-03-06 10:45:22 +00:00
2024-04-26 15:13:06 +01:00
2024-01-16 09:33:10 +00:00
2024-05-15 07:18:33 +08:00
2024-01-19 11:54:04 +00:00
2024-05-15 07:18:33 +08:00
2024-03-16 19:26:10 +00:00
2024-03-16 19:26:10 +00:00
2024-04-30 07:04:42 +08:00