aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/drawscreen.c
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-01-07 09:59:10 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2024-01-16 12:13:36 +0100
commitc6864b0d146f017990d6feb8c876784160a25241 (patch)
treea242585b366767765d0936eed93b2d8dc4286381 /src/nvim/drawscreen.c
parent50284d07b6f020c819aeb07bfb30d88453e63b6d (diff)
downloadrneovim-c6864b0d146f017990d6feb8c876784160a25241.tar.gz
rneovim-c6864b0d146f017990d6feb8c876784160a25241.tar.bz2
rneovim-c6864b0d146f017990d6feb8c876784160a25241.zip
fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'
Problem: The 'statuscolumn' is not redrawn on the wrapped part of a line when moving the cursor with 'relativenumber' set. Solution: Redraw the 'statuscolumn' for the entire line height in the "col_rows" win_line() code path.
Diffstat (limited to 'src/nvim/drawscreen.c')
-rw-r--r--src/nvim/drawscreen.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index b49de19349..8341989ab0 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -2285,9 +2285,8 @@ static void win_update(win_T *wp)
// Display one line
spellvars_T zero_spv = { 0 };
- row = win_line(wp, lnum, srow, wp->w_grid.rows, false,
- foldinfo.fi_lines > 0 ? &zero_spv : &spv,
- foldinfo);
+ row = win_line(wp, lnum, srow, wp->w_grid.rows, 0,
+ foldinfo.fi_lines > 0 ? &zero_spv : &spv, foldinfo);
if (foldinfo.fi_lines == 0) {
wp->w_lines[idx].wl_folded = false;
@@ -2325,7 +2324,7 @@ static void win_update(win_T *wp)
// text doesn't need to be drawn, but the number column does.
foldinfo_T info = wp->w_p_cul && lnum == wp->w_cursor.lnum
? cursorline_fi : fold_info(wp, lnum);
- win_line(wp, lnum, srow, wp->w_grid.rows, true, &spv, info);
+ win_line(wp, lnum, srow, wp->w_grid.rows, wp->w_lines[idx].wl_size, &spv, info);
}
// This line does not need to be drawn, advance to the next one.
@@ -2422,8 +2421,7 @@ static void win_update(win_T *wp)
// for ml_line_count+1 and only draw filler lines
spellvars_T zero_spv = { 0 };
foldinfo_T zero_foldinfo = { 0 };
- row = win_line(wp, wp->w_botline, row, wp->w_grid.rows, false, &zero_spv,
- zero_foldinfo);
+ row = win_line(wp, wp->w_botline, row, wp->w_grid.rows, 0, &zero_spv, zero_foldinfo);
}
} else if (dollar_vcol == -1) {
wp->w_botline = lnum;