From ee20e9e66942ce38c8d4a8f4387ac1ec00d1d64f Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 20 Sep 2023 10:18:40 +0200 Subject: refactor(grid): unused grid->line_wraps delenda est This is not used as part of the logic to actually implement TUI line wrapping In vim (especially gvim) it is used to emulate terminal-style text selection. But in nvim we don't do that, and have no plans to reintroduce it. --- src/nvim/ui_compositor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/ui_compositor.c') diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c index fcb63801e5..b88c355f42 100644 --- a/src/nvim/ui_compositor.c +++ b/src/nvim/ui_compositor.c @@ -413,9 +413,7 @@ static void compose_line(Integer row, Integer startcol, Integer endcol, LineFlag assert(endcol <= chk_width); assert(row < chk_height); - if (!(grid && grid == &default_grid)) { - // TODO(bfredl): too conservative, need check - // grid->line_wraps if grid->Width == Width + if (!(grid && (grid == &default_grid || (grid->comp_col == 0 && grid->cols == Columns)))) { flags = flags & ~kLineFlagWrap; } -- cgit