Files
neovim/runtime
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-05-14 08:27:17 +02:00
2024-04-27 11:01:14 +02:00
2023-11-05 21:56:56 +01:00
2024-09-13 20:59:13 +00:00
2024-02-16 08:57:45 +01:00
2024-03-24 10:32:07 +01:00
2022-08-20 10:04:55 +02:00
2024-03-28 09:32:32 +08:00
2024-02-01 12:06:55 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-24 11:33:06 +09:00
2024-03-14 15:04:31 +08:00
2024-07-24 09:20:05 +02:00