From 732b7d6e65c0349ee1d89b698bf9cd8a30c1015d Mon Sep 17 00:00:00 2001 From: "Jan M. Binder" Date: Sat, 7 Apr 2012 17:09:15 +0200 Subject: [PATCH] Fix bracket highlighter --- highlighters/brackets/brackets-highlighter.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/highlighters/brackets/brackets-highlighter.zsh b/highlighters/brackets/brackets-highlighter.zsh index 5166122..8e635dd 100644 --- a/highlighters/brackets/brackets-highlighter.zsh +++ b/highlighters/brackets/brackets-highlighter.zsh @@ -52,18 +52,18 @@ _zsh_highlight_brackets_highlighter() # Find all brackets and remember which one is matching for (( pos = 0; $pos < ${#BUFFER}; pos++ )) ; do - local char=$BUFFER[pos+1] + local char="$BUFFER[pos+1]" case $char in ["([{"]) levelpos[$pos]=$((++level)) lastoflevel[$level]=$pos - _zsh_highlight_brackets_highlighter_brackettype $char + _zsh_highlight_brackets_highlighter_brackettype "$char" ;; [")]}"]) matching[$lastoflevel[$level]]=$pos matching[$pos]=$lastoflevel[$level] levelpos[$pos]=$((level--)) - _zsh_highlight_brackets_highlighter_brackettype $char + _zsh_highlight_brackets_highlighter_brackettype "$char" ;; ['"'\']) # Skip everything inside quotes