From ac90970edcfe8c6c0f1804fb0f32f5aa8b9f9137 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Thu, 2 Nov 2017 19:11:00 -0500 Subject: [PATCH] brackets: Don't call _zsh_highlight_add_highlight with empty style --- highlighters/brackets/brackets-highlighter.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/highlighters/brackets/brackets-highlighter.zsh b/highlighters/brackets/brackets-highlighter.zsh index 1bdd1f9..d04ab38 100644 --- a/highlighters/brackets/brackets-highlighter.zsh +++ b/highlighters/brackets/brackets-highlighter.zsh @@ -77,12 +77,11 @@ _zsh_highlight_highlighter_brackets_paint() for pos in ${(k)levelpos}; do if (( $+matching[$pos] )); then if (( bracket_color_size )); then - style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 )) + _zsh_highlight_add_highlight $((pos - 1)) $pos bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 )) fi else - style=bracket-error + _zsh_highlight_add_highlight $((pos - 1)) $pos bracket-error fi - _zsh_highlight_add_highlight $((pos - 1)) $pos $style done # If cursor is on a bracket, then highlight corresponding bracket, if any.