From d59ce0fbd014bd69b1eed21c029c0d51bf8d6a09 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Sun, 29 Oct 2023 12:53:19 -0500 Subject: [PATCH] driver: Be resilient to KSH_ARRAYS being set in the calling scope --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 7827256..9f8fe48 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -123,7 +123,7 @@ _zsh_highlight() typeset -r ret # $region_highlight should be predefined, either by zle or by the test suite's mock (non-special) array. - (( ${+region_highlight} )) || { + (( ${+region_highlight[@]} )) || { echo >&2 'zsh-syntax-highlighting: error: $region_highlight is not defined' echo >&2 'zsh-syntax-highlighting: (Check whether zsh-syntax-highlighting was installed according to the instructions.)' return $ret