neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 52fe8eae078b027a04510715cc01b981f6879f8d
parent f5a3edb0c0f761a82b22cd1ac193538220fdee95
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed, 23 Mar 2022 20:23:41 +0800

fix(screen): do not update syntax_last_parsed when drawing folded line (#17826)


Diffstat:
Msrc/nvim/screen.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/nvim/screen.c b/src/nvim/screen.c @@ -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;