main: Fix blacklist dirs check when there is more than one element

This commit is contained in:
Matthew Martin 2018-09-24 07:07:32 -05:00
parent 3a7ddcda0b
commit 1eedb23c65
2 changed files with 2 additions and 2 deletions

View file

@ -771,7 +771,7 @@ _zsh_highlight_main_highlighter_check_path()
tmp_path=$tmp_path:a tmp_path=$tmp_path:a
while [[ $tmp_path != / ]]; do while [[ $tmp_path != / ]]; do
[[ -n "${(M)X_ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path}" ]] && return 1 [[ -n ${(M)X_ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
tmp_path=$tmp_path:h tmp_path=$tmp_path:h
done done

View file

@ -30,7 +30,7 @@
mkdir foo mkdir foo
touch foo/bar touch foo/bar
BUFFER=": foo/bar $PWD/foo foo/b" BUFFER=": foo/bar $PWD/foo foo/b"
X_ZSH_HIGHLIGHT_DIRS_BLACKLIST=($PWD/foo) X_ZSH_HIGHLIGHT_DIRS_BLACKLIST=($PWD/foo $PWD/bar)
expected_region_highlight=( expected_region_highlight=(
'1 1 builtin' # : '1 1 builtin' # :