diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-03-06 16:36:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-06 16:36:10 +0100 |
commit | 7371abf7554ebbcdb66bde3c892954596c497ff4 (patch) | |
tree | da5c551a765ef74ad43714eeda5ee274965a4ad6 /src | |
parent | 9a02906c44f3980e33e83171b30bc83abba8052c (diff) | |
download | rneovim-7371abf7554ebbcdb66bde3c892954596c497ff4.tar.gz rneovim-7371abf7554ebbcdb66bde3c892954596c497ff4.tar.bz2 rneovim-7371abf7554ebbcdb66bde3c892954596c497ff4.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawscreen.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; |