Skip to content

Commit ec29306

Browse files
committed
Test 4.3.11 workaround
1 parent 3a57b27 commit ec29306

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ _zsh_highlight_main_highlighter_highlight_list()
598598
arg=$args[1]
599599
shift args
600600
if (( $#in_alias )); then
601-
(( in_alias[-1]-- ))
602-
# Remove trailing 0 entries
603-
in_alias=($in_alias[1,$in_alias[(I)<1->]])
601+
(( in_alias[1]-- ))
602+
# Remove leading 0 entries
603+
in_alias=($in_alias[$in_alias[(i)<1->],-1])
604604
if (( $#in_alias == 0 )); then
605605
seen_alias=()
606606
# start_pos and end_pos are of the alias (previous $arg) here
@@ -713,11 +713,11 @@ _zsh_highlight_main_highlighter_highlight_list()
713713
alias_style=alias
714714
else
715715
# Transfer the count of this arg to the new element about to be appended.
716-
(( in_alias[-1]-- ))
716+
(( in_alias[1]-- ))
717717
fi
718-
# Add one because we will in_alias[-1]-- on the next loop iteration so
718+
# Add one because we will in_alias[1]-- on the next loop iteration so
719719
# this iteration should be considered in in_alias as well
720-
in_alias+=( $(($#alias_args + 1)) )
720+
in_alias=( $(($#alias_args + 1)) $in_alias )
721721
(( in_redirection++ )) # Stall this arg
722722
continue
723723
else

0 commit comments

Comments
 (0)