From 1f77ed8369ed26bdc92b746280b6f7822ccde06c Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Thu, 2 Nov 2017 19:11:34 -0500 Subject: [PATCH] brackets: Use idiomatic set check --- highlighters/brackets/brackets-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/brackets/brackets-highlighter.zsh b/highlighters/brackets/brackets-highlighter.zsh index e4d854f..cb09b40 100644 --- a/highlighters/brackets/brackets-highlighter.zsh +++ b/highlighters/brackets/brackets-highlighter.zsh @@ -91,7 +91,7 @@ _zsh_highlight_highlighter_brackets_paint() # If cursor is on a bracket, then highlight corresponding bracket, if any. if [[ $WIDGET != zle-line-finish ]]; then pos=$((CURSOR + 1)) - if [[ -n $levelpos[$pos] ]] && [[ -n $matching[$pos] ]]; then + if (( $+levelpos[$pos] )) && (( $+matching[$pos] )); then local -i otherpos=$matching[$pos] _zsh_highlight_add_highlight $((otherpos - 1)) $otherpos cursor-matchingbracket fi