From 7371abf7554ebbcdb66bde3c892954596c497ff4 Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Thu, 6 Mar 2025 16:36:10 +0100 Subject: fix(marks): wrong winline info for concealed line with below virt line (#32747) Problem: Skipping over a concealed line for which `win_line()` _should_ be called because it has `virt_lines_above = false` lines associated with it. Solution: Don't include such a line in `wl_lastlnum` from the line above. --- src/nvim/drawscreen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index c17bc2d999..e958610f20 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -2118,13 +2118,13 @@ static void win_update(win_T *wp) if (wp == curwin && lnum == curwin->w_cursor.lnum) { conceal_cursor_used = conceal_cursor_line(curwin); } - if (idx > 0) { - wp->w_lines[idx - 1].wl_lastlnum = lnum + foldinfo.fi_lines - (foldinfo.fi_lines != 0); - } - if (lnum == mod_top && lnum < mod_bot) { - mod_top += foldinfo.fi_lines ? foldinfo.fi_lines : 1; - } if (win_get_fill(wp, lnum) == 0) { + if (idx > 0) { + wp->w_lines[idx - 1].wl_lastlnum = lnum + foldinfo.fi_lines - (foldinfo.fi_lines != 0); + } + if (lnum == mod_top && lnum < mod_bot) { + mod_top += foldinfo.fi_lines ? foldinfo.fi_lines : 1; + } lnum += foldinfo.fi_lines ? foldinfo.fi_lines : 1; spv.spv_capcol_lnum = 0; continue; -- cgit