mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
UGRID_FOREACH_CELL: avoid shadowed variables
This commit is contained in:
parent
a70fde1b45
commit
7ede14d191
@ -1174,7 +1174,7 @@ static void tui_flush(UI *ui)
|
||||
}
|
||||
|
||||
UGRID_FOREACH_CELL(grid, row, r.left, clear_col, {
|
||||
cursor_goto(ui, row, col);
|
||||
cursor_goto(ui, row, curcol);
|
||||
print_cell(ui, cell);
|
||||
});
|
||||
if (clear_col < r.right) {
|
||||
@ -1283,7 +1283,7 @@ static void tui_raw_line(UI *ui, Integer g, Integer linerow, Integer startcol,
|
||||
grid->cells[linerow][c].attr = attrs[c-startcol];
|
||||
}
|
||||
UGRID_FOREACH_CELL(grid, (int)linerow, (int)startcol, (int)endcol, {
|
||||
cursor_goto(ui, (int)linerow, col);
|
||||
cursor_goto(ui, (int)linerow, curcol);
|
||||
print_cell(ui, cell);
|
||||
});
|
||||
|
||||
|
@ -25,8 +25,8 @@ struct ugrid {
|
||||
#define UGRID_FOREACH_CELL(grid, row, startcol, endcol, code) \
|
||||
do { \
|
||||
UCell *row_cells = (grid)->cells[row]; \
|
||||
for (int col = startcol; col < endcol; col++) { \
|
||||
UCell *cell = row_cells + col; \
|
||||
for (int curcol = startcol; curcol < endcol; curcol++) { \
|
||||
UCell *cell = row_cells + curcol; \
|
||||
(void)(cell); \
|
||||
code; \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user