Merge remote-tracking branch 'danielsh/whitespace-historical'

* danielsh/whitespace-historical:
  Fix historical instances of one-space indentation.
This commit is contained in:
Daniel Shahaf 2020-03-17 17:08:06 +00:00
commit 0f627fdf60

View File

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