diff options
author | LW <git@llllvvuu.dev> | 2023-11-03 15:56:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 06:56:45 +0800 |
commit | 468292dcb743c79714b030557cf2754b7b5bf07d (patch) | |
tree | aa7b9a309c68222b0e8d1af2f7fb90c07024df2f /runtime/lua/vim/lsp/buf.lua | |
parent | 9ad239690fe6b151afe2f43c2858d68a2b877e1d (diff) | |
download | rneovim-468292dcb743c79714b030557cf2754b7b5bf07d.tar.gz rneovim-468292dcb743c79714b030557cf2754b7b5bf07d.tar.bz2 rneovim-468292dcb743c79714b030557cf2754b7b5bf07d.zip |
fix(rpc): "grid_line" event parsing crashes (#25581)
refactor: use a more idiomatic loop to iterate over the cells
There are two cases in which the following assertion would fail:
```c
assert(g->icell < g->ncells);
```
1. If `g->ncells = 0`. Update this to be legal.
2. If an EOF is reached while parsing `wrap`. In this case, the unpacker
attempts to resume from `cells`, which is a bug. Create a new state
for parsing `wrap`.
Reference: https://neovim.io/doc/user/ui.html#ui-event-grid_line
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
0 files changed, 0 insertions, 0 deletions