Skip to content

Commit

Permalink
fix(screen): do not update syntax_last_parsed when drawing folded line (
Browse files Browse the repository at this point in the history
  • Loading branch information
zeertzjq committed Mar 23, 2022
1 parent f5a3edb commit 52fe8ea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/nvim/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1545,17 +1545,17 @@ static void win_update(win_T *wp, DecorProviders *providers)
foldinfo.fi_lines ? srow : wp->w_grid.Rows,
mod_top == 0, false, foldinfo, &line_providers);

wp->w_lines[idx].wl_folded = foldinfo.fi_lines != 0;
wp->w_lines[idx].wl_lastlnum = lnum;
did_update = DID_LINE;

if (foldinfo.fi_lines > 0) {
did_update = DID_FOLD;
if (foldinfo.fi_lines == 0) {
wp->w_lines[idx].wl_folded = false;
wp->w_lines[idx].wl_lastlnum = lnum;
did_update = DID_LINE;
syntax_last_parsed = lnum;
} else {
foldinfo.fi_lines--;
wp->w_lines[idx].wl_folded = true;
wp->w_lines[idx].wl_lastlnum = lnum + foldinfo.fi_lines;
did_update = DID_FOLD;
}

syntax_last_parsed = lnum;
}

wp->w_lines[idx].wl_lnum = lnum;
Expand Down

0 comments on commit 52fe8ea

Please sign in to comment.