mirror of
https://github.com/neovim/neovim.git
synced 2026-03-14 21:07:24 +00:00
fix(pum): crash when resizing grid with pumborder set (#36404)
Problem: Grid size check didn't account for border_width, causing row index out of bounds when drawing bordered popup menu. Solution: Check grid.rows against pum_height + border_width.
This commit is contained in:
@@ -660,7 +660,8 @@ void pum_redraw(void)
|
||||
pum_invalid = false;
|
||||
must_redraw_pum = false;
|
||||
|
||||
if (!pum_grid.chars || pum_grid.rows != pum_height || pum_grid.cols != grid_width) {
|
||||
if (!pum_grid.chars || pum_grid.rows != pum_height + border_width
|
||||
|| pum_grid.cols != grid_width + border_width) {
|
||||
grid_alloc(&pum_grid, pum_height + border_width, grid_width + border_width,
|
||||
!invalid_grid, false);
|
||||
ui_call_grid_resize(pum_grid.handle, pum_grid.cols, pum_grid.rows);
|
||||
|
||||
Reference in New Issue
Block a user