mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
fix: screenchar()/screenstring() with multigrid #32494
Problem: - When multigrid is enabled, screenchar()/screenstring() functions return wrong results. See https://github.com/neovide/neovide/issues/2569 - `screenstring()` executed via RPC in child Nvim process, doesn't recognize floating windows. Solution: In ui_comp_get_grid_at_coord(), also iterate window grids.
This commit is contained in:
@@ -333,6 +333,14 @@ ScreenGrid *ui_comp_get_grid_at_coord(int row, int col)
|
||||
return grid;
|
||||
}
|
||||
}
|
||||
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||
ScreenGrid *grid = &wp->w_grid_alloc;
|
||||
if (row >= grid->comp_row && row < grid->comp_row + grid->rows
|
||||
&& col >= grid->comp_col && col < grid->comp_col + grid->cols) {
|
||||
return grid;
|
||||
}
|
||||
}
|
||||
return &default_grid;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user