minor: Fix WARN_CREATE_GLOBAL warnings issued by zsh 5.1.1-dev-0.
The following warnings are issued by zsh as of zsh-workers/37018 (commit de9effbce601 to zsh itself): _zsh_highlight_main_highlighter_highlight_dollar_string:17: array parameter match created globally in function _zsh_highlight_main_highlighter_highlight_dollar_string _zsh_highlight_main_highlighter_highlight_dollar_string:17: array parameter mbegin created globally in function _zsh_highlight_main_highlighter_highlight_dollar_string _zsh_highlight_main_highlighter_highlight_dollar_string:17: array parameter mend created globally in function _zsh_highlight_main_highlighter_highlight_dollar_string _zsh_highlight_main_highlighter_highlight_dollar_string:17: numeric parameter parameter MBEGIN created globally in function _zsh_highlight_main_highlighter_highlight_dollar_string _zsh_highlight_main_highlighter_highlight_dollar_string:17: numeric parameter parameter MEND created globally in function _zsh_highlight_main_highlighter_highlight_dollar_string _zsh_highlight_main_highlighter_highlight_dollar_string:17: scalar parameter MATCH created globally in function _zsh_highlight_main_highlighter_highlight_dollar_string _zsh_highlight_main_highlighter_highlight_string:11: array parameter match created globally in function _zsh_highlight_main_highlighter_highlight_string _zsh_highlight_main_highlighter_highlight_string:11: array parameter mbegin created globally in function _zsh_highlight_main_highlighter_highlight_string _zsh_highlight_main_highlighter_highlight_string:11: array parameter mend created globally in function _zsh_highlight_main_highlighter_highlight_string _zsh_highlight_main_highlighter_highlight_string:11: numeric parameter parameter MBEGIN created globally in function _zsh_highlight_main_highlighter_highlight_string _zsh_highlight_main_highlighter_highlight_string:11: numeric parameter parameter MEND created globally in function _zsh_highlight_main_highlighter_highlight_string _zsh_highlight_main_highlighter_highlight_string:11: scalar parameter MATCH created globally in function _zsh_highlight_main_highlighter_highlight_string
This commit is contained in:
parent
8ab8c815ec
commit
d3deffbf46
@ -389,6 +389,8 @@ _zsh_highlight_main_highlighter_check_path()
|
||||
_zsh_highlight_main_highlighter_highlight_string()
|
||||
{
|
||||
setopt localoptions noksharrays
|
||||
local -a match mbegin mend
|
||||
local MATCH; integer MBEGIN MEND
|
||||
local i j k style
|
||||
# Starting quote is at 1, so start parsing at offset 2 in the string.
|
||||
for (( i = 2 ; i < end_pos - start_pos ; i += 1 )) ; do
|
||||
@ -423,6 +425,8 @@ _zsh_highlight_main_highlighter_highlight_string()
|
||||
_zsh_highlight_main_highlighter_highlight_dollar_string()
|
||||
{
|
||||
setopt localoptions noksharrays
|
||||
local -a match mbegin mend
|
||||
local MATCH; integer MBEGIN MEND
|
||||
local i j k style
|
||||
local AA
|
||||
integer c
|
||||
|
@ -52,6 +52,7 @@ _zsh_highlight_pattern_highlighter_loop()
|
||||
# This does *not* do its job syntactically, sorry.
|
||||
local buf="$1" pat="$2"
|
||||
local -a match mbegin mend
|
||||
local MATCH; integer MBEGIN MEND
|
||||
if [[ "$buf" == (#b)(*)(${~pat})* ]]; then
|
||||
region_highlight+=("$((mbegin[2] - 1)) $mend[2] $ZSH_HIGHLIGHT_PATTERNS[$pat]")
|
||||
"$0" "$match[1]" "$pat"; return $?
|
||||
|
Loading…
Reference in New Issue
Block a user