aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-03-06 16:36:10 +0100
committerGitHub <noreply@github.com>2025-03-06 16:36:10 +0100
commit7371abf7554ebbcdb66bde3c892954596c497ff4 (patch)
treeda5c551a765ef74ad43714eeda5ee274965a4ad6 /src
parent9a02906c44f3980e33e83171b30bc83abba8052c (diff)
downloadrneovim-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.c12
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;