From b1a4db0b69e4744f9a4b4e4844021bb9026f03a6 Mon Sep 17 00:00:00 2001 From: nate Date: Thu, 9 Nov 2017 13:33:37 -0800 Subject: :highlight : avoid redraw on error do_highlight() should not redraw if a validation error occurred. closes #7489 --- src/nvim/syntax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(); -- cgit