Browse Source

simplify check for bracket under cursor

pull/63/head
garinger 13 years ago
parent
commit
2fe9505647
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      highlighters/brackets/brackets-highlighter.zsh

+ 2
- 4
highlighters/brackets/brackets-highlighter.zsh View File

@ -79,10 +79,8 @@ _zsh_highlight_brackets_highlighter()
fi fi
done done
((pos = CURSOR + 1)) ((pos = CURSOR + 1))
if [[ -n $levelpos[$pos] ]]; then
local otherpos
((otherpos = -1))
[[ -n $matching[$pos] ]] && otherpos=$matching[$pos]
if [[ -n $levelpos[$pos] ]] && [[ -n $matching[$pos] ]]; then
local otherpos=$matching[$pos]
region_highlight+=("$((otherpos - 1)) $otherpos standout") region_highlight+=("$((otherpos - 1)) $otherpos standout")
fi fi
} }

Loading…
Cancel
Save