File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ _zsh_highlight()
76
76
# Make it read-only. Can't combine this with the previous line when POSIX_BUILTINS may be set.
77
77
typeset -r ret
78
78
79
+ # $region_highlight should be predefined, either by zle or by the test suite's mock (non-special) array.
80
+ (( ${+region_highlight} )) || {
81
+ echo >&2 ' zsh-syntax-highlighting: error: $region_highlight is not defined'
82
+ echo >&2 ' zsh-syntax-highlighting: (Check whether zsh-syntax-highlighting was installed according to the instructions.)'
83
+ return $ret
84
+ }
85
+
79
86
# Remove all highlighting in isearch, so that only the underlining done by zsh itself remains.
80
87
# For details see FAQ entry 'Why does syntax highlighting not work while searching history?'.
81
88
# This disables highlighting during isearch (for reasons explained in README.md) unless zsh is new enough
@@ -118,7 +125,6 @@ _zsh_highlight()
118
125
[[ $PENDING -gt 0 ]] && return $ret
119
126
120
127
# Reset region highlight to build it from scratch
121
- typeset -ga region_highlight
122
128
region_highlight=();
123
129
124
130
{
You can’t perform that action at this time.
0 commit comments