*highlight: Compress always-block related code, use explicit string

This commit is contained in:
Sebastian Gniazdowski 2016-10-25 20:36:04 +02:00
parent 07569cd060
commit f65df29907

View file

@ -404,6 +404,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
: ${expanded_path::=${(Q)~arg}} : ${expanded_path::=${(Q)~arg}}
-hsmw-highlight-main-type $expanded_path -hsmw-highlight-main-type $expanded_path
fi fi
case $REPLY in case $REPLY in
reserved) # reserved word reserved) # reserved word
style=reserved-word style=reserved-word
@ -412,9 +413,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
elif [[ $arg == $'\x7d' ]]; then elif [[ $arg == $'\x7d' ]]; then
# We're at command word, so no need to check $right_brace_is_recognised_everywhere # We're at command word, so no need to check $right_brace_is_recognised_everywhere
-hsmw-highlight-stack-pop 'Y' style=reserved-word -hsmw-highlight-stack-pop 'Y' style=reserved-word
if [[ $style == reserved-word ]]; then [[ $style == "reserved-word" ]] && (( next_word = next_word | BIT_always ))
(( next_word = next_word | BIT_always ))
fi
fi fi
;; ;;
'suffix alias') style=suffix-alias;; 'suffix alias') style=suffix-alias;;