Merge remote-tracking branch 'danielsh/whitespace-historical'
* danielsh/whitespace-historical: Fix historical instances of one-space indentation.
This commit is contained in:
commit
0f627fdf60
@ -850,7 +850,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
case $res in
|
case $res in
|
||||||
reserved) # reserved word
|
(reserved) # reserved word
|
||||||
style=reserved-word
|
style=reserved-word
|
||||||
# Match braces and handle special cases.
|
# Match braces and handle special cases.
|
||||||
case $arg in
|
case $arg in
|
||||||
@ -927,15 +927,17 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
'suffix alias') style=suffix-alias;;
|
('suffix alias')
|
||||||
alias) :;;
|
style=suffix-alias
|
||||||
builtin) style=builtin
|
;;
|
||||||
|
(alias) :;;
|
||||||
|
(builtin) style=builtin
|
||||||
[[ $arg == $'\x5b' ]] && braces_stack='Q'"$braces_stack"
|
[[ $arg == $'\x5b' ]] && braces_stack='Q'"$braces_stack"
|
||||||
;;
|
;;
|
||||||
function) style=function;;
|
(function) style=function;;
|
||||||
command) style=command;;
|
(command) style=command;;
|
||||||
hashed) style=hashed-command;;
|
(hashed) style=hashed-command;;
|
||||||
none) if (( ! in_param )) && _zsh_highlight_main_highlighter_check_assign; then
|
(none) if (( ! in_param )) && _zsh_highlight_main_highlighter_check_assign; then
|
||||||
_zsh_highlight_main_add_region_highlight $start_pos $end_pos assign
|
_zsh_highlight_main_add_region_highlight $start_pos $end_pos assign
|
||||||
local i=$(( arg[(i)=] + 1 ))
|
local i=$(( arg[(i)=] + 1 ))
|
||||||
if [[ $arg[i] == '(' ]]; then
|
if [[ $arg[i] == '(' ]]; then
|
||||||
@ -1004,7 +1006,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*) _zsh_highlight_main_add_region_highlight $start_pos $end_pos arg0_$res
|
(*) _zsh_highlight_main_add_region_highlight $start_pos $end_pos arg0_$res
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -1014,7 +1016,8 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
fi
|
fi
|
||||||
else # $arg is a non-command word
|
else # $arg is a non-command word
|
||||||
case $arg in
|
case $arg in
|
||||||
$'\x29') # subshell or end of array assignment
|
($'\x29')
|
||||||
|
# subshell or end of array assignment
|
||||||
if $in_array_assignment; then
|
if $in_array_assignment; then
|
||||||
style=assign
|
style=assign
|
||||||
in_array_assignment=false
|
in_array_assignment=false
|
||||||
@ -1028,8 +1031,10 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
_zsh_highlight_main__stack_pop 'R' reserved-word
|
_zsh_highlight_main__stack_pop 'R' reserved-word
|
||||||
fi;;
|
fi
|
||||||
$'\x28\x29') # possibly a function definition
|
;;
|
||||||
|
($'\x28\x29')
|
||||||
|
# possibly a function definition
|
||||||
if (( in_redirection )) || $in_array_assignment; then
|
if (( in_redirection )) || $in_array_assignment; then
|
||||||
style=unknown-token
|
style=unknown-token
|
||||||
else
|
else
|
||||||
@ -1040,7 +1045,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
style=reserved-word
|
style=reserved-word
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*) if false; then
|
(*) if false; then
|
||||||
elif [[ $arg = $'\x7d' ]] && $right_brace_is_recognised_everywhere; then
|
elif [[ $arg = $'\x7d' ]] && $right_brace_is_recognised_everywhere; then
|
||||||
# Parsing rule: {
|
# Parsing rule: {
|
||||||
#
|
#
|
||||||
@ -1341,14 +1346,14 @@ _zsh_highlight_main_highlighter_highlight_double_quote()
|
|||||||
(( j = i + start_pos - 1 ))
|
(( j = i + start_pos - 1 ))
|
||||||
(( k = j + 1 ))
|
(( k = j + 1 ))
|
||||||
case "$arg[$i]" in
|
case "$arg[$i]" in
|
||||||
'"') break;;
|
('"') break;;
|
||||||
'`') saved_reply=($reply)
|
('`') saved_reply=($reply)
|
||||||
_zsh_highlight_main_highlighter_highlight_backtick $i
|
_zsh_highlight_main_highlighter_highlight_backtick $i
|
||||||
(( i = REPLY ))
|
(( i = REPLY ))
|
||||||
reply=($saved_reply $reply)
|
reply=($saved_reply $reply)
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
'$' ) style=dollar-double-quoted-argument
|
('$') style=dollar-double-quoted-argument
|
||||||
# Look for an alphanumeric parameter name.
|
# Look for an alphanumeric parameter name.
|
||||||
if [[ ${arg:$i} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+) ]] ; then
|
if [[ ${arg:$i} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+) ]] ; then
|
||||||
(( k += $#MATCH )) # highlight the parameter name
|
(( k += $#MATCH )) # highlight the parameter name
|
||||||
|
Loading…
Reference in New Issue
Block a user