aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-28 16:19:36 +0200
committerGitHub <noreply@github.com>2019-04-28 16:19:36 +0200
commit33b20ce7de24b803a85435fdb53801ee9c247385 (patch)
tree585f27f15914260599f6202cb27c0842d0b8c1ec
parentfbd6666a0675f8249b702ce83c6fb35937b8fb91 (diff)
downloadrneovim-33b20ce7de24b803a85435fdb53801ee9c247385.tar.gz
rneovim-33b20ce7de24b803a85435fdb53801ee9c247385.tar.bz2
rneovim-33b20ce7de24b803a85435fdb53801ee9c247385.zip
tui:cursor_goto(): remove dead code #9952
fix #9918 ref dbc25f5a87cf3bcfe1caac1eb1ff8b3a6978a415 Before 7ede14d191b1 the 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); After 7ede14d191b1 issue #9918 was reported. $ ./build/bin/nvim -Nu NONE +'colo evening' :h<tab> " causes cursor to change colors Since the code was dead before 7ede14d191b1, just remove it.
-rw-r--r--src/nvim/tui/tui.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 0603e504ec..42e5b9b270 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -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