aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_compositor.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-10-05 14:44:13 +0200
committerbfredl <bjorn.linse@gmail.com>2023-10-06 10:16:30 +0200
commita58bb215449cee65b965b9094e9e996ddfe78315 (patch)
treed5ed5946e782d4a50b1b94c9de40948a81e07e3b /src/nvim/ui_compositor.c
parentf67517bba30b6233bea85e1f6a8505171142d4ca (diff)
downloadrneovim-a58bb215449cee65b965b9094e9e996ddfe78315.tar.gz
rneovim-a58bb215449cee65b965b9094e9e996ddfe78315.tar.bz2
rneovim-a58bb215449cee65b965b9094e9e996ddfe78315.zip
refactor(grid): get rid of unbatched grid_puts and grid_putchar
This finalizes the long running refactor from the old TUI-focused grid implementation where text-drawing cursor was not separated from the visible cursor. Still, the pattern of setting cursor position together with updating a line was convenient. Introduce grid_line_cursor_goto() to still allow this but now being explicit about it. Only having batched drawing functions makes code involving drawing a bit longer. But it is better to be explicit, and this highlights cases where multiple small redraws can be grouped together. This was the case for most of the changed places (messages, lastline, and :intro)
Diffstat (limited to 'src/nvim/ui_compositor.c')
-rw-r--r--src/nvim/ui_compositor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c
index 0f26e269ae..8c16380f1f 100644
--- a/src/nvim/ui_compositor.c
+++ b/src/nvim/ui_compositor.c
@@ -532,7 +532,7 @@ void ui_comp_raw_line(Integer grid, Integer row, Integer startcol, Integer endco
compose_debug(row, row + 1, startcol, clearcol, dbghl_composed, true);
compose_line(row, startcol, clearcol, flags);
} else {
- compose_debug(row, row + 1, startcol, endcol, dbghl_normal, false);
+ compose_debug(row, row + 1, startcol, endcol, dbghl_normal, endcol >= clearcol);
compose_debug(row, row + 1, endcol, clearcol, dbghl_clear, true);
#ifndef NDEBUG
for (int i = 0; i < endcol - startcol; i++) {