aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index d28e996581..bc7362af72 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -6648,7 +6648,7 @@ do_highlight(char_u *line, int forceit, int init) {
if (error && idx == highlight_ga.ga_len) {
syn_unadd_group();
} else {
- if (is_normal_group) {
+ if (!error && is_normal_group) {
// Need to update all groups, because they might be using "bg" and/or
// "fg", which have been changed now.
highlight_attr_set_all();