File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -73,29 +73,20 @@ _zsh_highlight_highlighter_main_predicate()
7373
7474# Helper to deal with tokens crossing line boundaries.
7575_zsh_highlight_main_add_region_highlight () {
76- integer start=$1 end=$2
77- shift 2
78-
7976 if (( in_alias )) ; then
80- [[ $1 == unknown-token ]] && alias_style=unknown-token
77+ [[ $3 == unknown-token ]] && alias_style=unknown-token
8178 return
8279 fi
80+
8381 if (( in_param )) ; then
84- if [[ $1 == unknown-token ]]; then
85- param_style=unknown-token
82+ if [[ -z $param_style || $3 == unknown-token ]]; then
83+ param_style=$3
8684 fi
87- if [[ -n $param_style ]]; then
88- return
89- fi
90- param_style=$1
9185 return
9286 fi
9387
9488 # The calculation was relative to $buf but region_highlight is relative to $BUFFER.
95- (( start += buf_offset ))
96- (( end += buf_offset ))
97-
98- list_highlights+=($start $end $1 )
89+ list_highlights+=($(( $1 + buf_offset )) $(( $2 + buf_offset )) $3 )
9990}
10091
10192_zsh_highlight_main_add_many_region_highlights () {
You can’t perform that action at this time.
0 commit comments