From 1f1e629290773bd6f9673f364303219d6da11129 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Mon, 22 Jan 2018 21:41:49 -0600 Subject: [PATCH] regexp: Add missing local for arrays match mbegin mend See #497. --- highlighters/regexp/regexp-highlighter.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/highlighters/regexp/regexp-highlighter.zsh b/highlighters/regexp/regexp-highlighter.zsh index 0edc461..26f9da3 100644 --- a/highlighters/regexp/regexp-highlighter.zsh +++ b/highlighters/regexp/regexp-highlighter.zsh @@ -52,6 +52,7 @@ _zsh_highlight_regexp_highlighter_loop() local buf="$1" pat="$2" integer OFFSET=0 local MATCH; integer MBEGIN MEND + local -a match mbegin mend while true; do [[ "$buf" =~ "$pat" ]] || return; region_highlight+=("$((MBEGIN - 1 + OFFSET)) $((MEND + OFFSET)) $ZSH_HIGHLIGHT_REGEXP[$pat]")