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()
73
73
74
74
# Helper to deal with tokens crossing line boundaries.
75
75
_zsh_highlight_main_add_region_highlight () {
76
- integer start=$1 end=$2
77
- shift 2
78
-
79
76
if (( in_alias )) ; then
80
- [[ $1 == unknown-token ]] && alias_style=unknown-token
77
+ [[ $3 == unknown-token ]] && alias_style=unknown-token
81
78
return
82
79
fi
80
+
83
81
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
86
84
fi
87
- if [[ -n $param_style ]]; then
88
- return
89
- fi
90
- param_style=$1
91
85
return
92
86
fi
93
87
94
88
# 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 )
99
90
}
100
91
101
92
_zsh_highlight_main_add_many_region_highlights () {
You can’t perform that action at this time.
0 commit comments