More code style fixes

Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
This commit is contained in:
Julien Nicoulaud 2011-02-17 21:02:23 +01:00
parent 2670c93e05
commit 3abf463753

View File

@ -128,8 +128,7 @@ _zsh_highlight-zle-buffer() {
local -a funinds local -a funinds
local -i rh_size=$#region_highlight local -i rh_size=$#region_highlight
for i in {1..${#zsh_highlight_functions}}; do for i in {1..${#zsh_highlight_functions}}; do
local pred=${zsh_highlight_predicates[i]} local pred=${zsh_highlight_predicates[i]} cache_place=${zsh_highlight_caches[i]}
local cache_place=${zsh_highlight_caches[i]}
if _zsh_highlight-zle-buffer-p "$rh_size" "$pred"; then if _zsh_highlight-zle-buffer-p "$rh_size" "$pred"; then
if ((${#${(P)cache_place}} > 0)); then if ((${#${(P)cache_place}} > 0)); then
region_highlight=(${region_highlight:#(${(P~j.|.)cache_place})}) region_highlight=(${region_highlight:#(${(P~j.|.)cache_place})})
@ -139,8 +138,7 @@ _zsh_highlight-zle-buffer() {
fi fi
done done
for i in $funinds; do for i in $funinds; do
local func=${zsh_highlight_functions[i]} local func=${zsh_highlight_functions[i]} cache_place=${zsh_highlight_caches[i]}
local cache_place=${zsh_highlight_caches[i]}
local -a rh; rh=($region_highlight) local -a rh; rh=($region_highlight)
{ {
"$func" "$func"
@ -183,7 +181,7 @@ _zsh_highlight_add-highlighter() {
# Register the builtin highlighters. # Register the builtin highlighters.
_zsh_highlight_add-highlighter _zsh_main-highlight _zsh_highlight_buffer-modified-p _zsh_highlight_add-highlighter _zsh_main-highlight _zsh_highlight_buffer-modified-p
_zsh_highlight_add-highlighter _zsh_highlight-bracket-match _zsh_highlight_add-highlighter _zsh_highlight_bracket-match
# Core syntax highlighting. # Core syntax highlighting.
_zsh_main-highlight() { _zsh_main-highlight() {
@ -256,7 +254,7 @@ _zsh_highlight_bracket-match-p() {
} }
# Bracket match highlighting. # Bracket match highlighting.
_zsh_highlight-bracket-match() { _zsh_highlight_bracket-match() {
# Bracket matching # Bracket matching
bracket_color_size=${#ZSH_HIGHLIGHT_MATCHING_BRACKETS_STYLES} bracket_color_size=${#ZSH_HIGHLIGHT_MATCHING_BRACKETS_STYLES}
if ((bracket_color_size > 0)); then if ((bracket_color_size > 0)); then