fix(grid): add start column when getting char on line (#25627)

This commit is contained in:
zeertzjq
2023-10-13 21:43:06 +08:00
committed by GitHub
parent ebe489d8f0
commit 9f32deba56
2 changed files with 35 additions and 0 deletions

View File

@@ -352,6 +352,7 @@ void grid_line_start(ScreenGrid *grid, int row)
schar_T grid_line_getchar(int col, int *attr)
{
if (col < grid_line_maxcol) {
col += grid_line_coloff;
size_t off = grid_line_grid->line_offset[grid_line_row] + (size_t)col;
if (attr != NULL) {
*attr = grid_line_grid->attrs[off];