aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_extui/shared.lua
diff options
context:
space:
mode:
authorEvan Hahn <me@evanhahn.com>2025-05-22 08:22:47 -0500
committerGitHub <noreply@github.com>2025-05-22 06:22:47 -0700
commit927927e143bd365264d7a4ef59ad1d2425006cba (patch)
treeed69de463b5402c3e88edec48abbc0d71f1c2248 /runtime/lua/vim/_extui/shared.lua
parent27bb814cb1b70b4e041eae22665bc93350f4fe56 (diff)
downloadrneovim-927927e143bd365264d7a4ef59ad1d2425006cba.tar.gz
rneovim-927927e143bd365264d7a4ef59ad1d2425006cba.tar.bz2
rneovim-927927e143bd365264d7a4ef59ad1d2425006cba.zip
fix(lsp): fix error with InsertReplaceEdit events #33973
Problem: Some LSPs cause the following completion error (reformatted slightly): Error executing vim.schedule lua callback: .../runtime/lua/vim/lsp/completion.lua:373 attempt to index field 'range' (a nil value) This is because an internal function assumes edits are either missing or of type `TextEdit`, but there's a third [possibility][0] that's not handled: the `InsertReplaceEdit`. This was previously reported in at least two issues: - https://github.com/neovim/neovim/issues/33142 - https://github.com/neovim/neovim/issues/33224 Solution: Don't assume the edit is a `TextEdit`. This implicitly handles `InsertReplaceEdit`s. Also, add a test case for this, which previously caused an error. [0]: https://github.com/neovim/neovim/blob/2c07428966a74c76003e00e2a37bf98eb8802c93/runtime/lua/vim/lsp/_meta/protocol.lua#L1099
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
0 files changed, 0 insertions, 0 deletions