mirror of
https://github.com/neovim/neovim.git
synced 2026-07-17 14:41:33 +00:00
tui:cursor_goto(): remove dead code #9952
fix #9918 refdbc25f5a87Before7ede14d191the UGRID_FOREACH_CELL loop was never entered, because it expanded to an always-false condition. From build/src/nvim/auto/tui/tui.i: do { UCell *row_cells = (grid)->cells[grid->row]; for (int col = grid->col; col < col; col++) { UCell *cell = row_cells + col; (void)(cell); { print_cell(ui, cell); }; } } while (0); After7ede14d191issue #9918 was reported. $ ./build/bin/nvim -Nu NONE +'colo evening' :h<tab> " causes cursor to change colors Since the code was dead before7ede14d191, just remove it.
This commit is contained in:
@@ -704,14 +704,6 @@ static void cursor_goto(UI *ui, int row, int col)
|
||||
// even less expensive than using BSes or CUB.
|
||||
unibi_out(ui, unibi_carriage_return);
|
||||
ugrid_goto(grid, grid->row, 0);
|
||||
} else if (col > grid->col) {
|
||||
int n = col - grid->col;
|
||||
if (n <= (row == grid->row ? 4 : 2)
|
||||
&& cheap_to_print(ui, grid->row, grid->col, n)) {
|
||||
UGRID_FOREACH_CELL(grid, grid->row, grid->col, col, {
|
||||
print_cell(ui, cell);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (row == grid->row) {
|
||||
if (col < grid->col
|
||||
|
||||
Reference in New Issue
Block a user