aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-23 07:07:34 +0800
committerGitHub <noreply@github.com>2022-03-23 07:07:34 +0800
commit7735163652cd9082ef89cb31707ca77df12f7b70 (patch)
treea2f84fea5e9062633255c1c4642d53e2452a234e /src
parent159111f9a59d9e366fe975bf78c223228ce9ca8a (diff)
downloadrneovim-7735163652cd9082ef89cb31707ca77df12f7b70.tar.gz
rneovim-7735163652cd9082ef89cb31707ca77df12f7b70.tar.bz2
rneovim-7735163652cd9082ef89cb31707ca77df12f7b70.zip
fix(screen): do not do syntax highlighting at filler or folded lines (#17818)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 96bc5180e2..7182e69d08 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2160,7 +2160,8 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
// To speed up the loop below, set extra_check when there is linebreak,
// trailing white space and/or syntax processing to be done.
extra_check = wp->w_p_lbr;
- if (syntax_present(wp) && !wp->w_s->b_syn_error && !wp->w_s->b_syn_slow) {
+ if (syntax_present(wp) && !wp->w_s->b_syn_error && !wp->w_s->b_syn_slow
+ && !has_fold && !end_fill) {
// Prepare for syntax highlighting in this line. When there is an
// error, stop syntax highlighting.
save_did_emsg = did_emsg;