File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -986,10 +986,12 @@ _zsh_highlight_main_highlighter_check_path()
986
986
[[ -e $expanded_path ]] && return 0
987
987
988
988
# Search the path in CDPATH
989
- local cdpath_dir
990
- for cdpath_dir in $cdpath ; do
991
- [[ -e " $cdpath_dir /$expanded_path " ]] && return 0
992
- done
989
+ if [[ $expanded_path != /* ]]; then
990
+ local cdpath_dir
991
+ for cdpath_dir in $cdpath ; do
992
+ [[ -e " $cdpath_dir /$expanded_path " ]] && return 0
993
+ done
994
+ fi
993
995
994
996
# If dirname($1) doesn't exist, neither does $1.
995
997
[[ ! -d ${expanded_path: h} ]] && return 1
Original file line number Diff line number Diff line change @@ -34,5 +34,5 @@ mkdir foo foo/bar
34
34
BUFFER=" /foo"
35
35
36
36
expected_region_highlight=(
37
- ' 1 4 unknown-token "fixed in the next commit" ' # x (/)
37
+ ' 1 4 unknown-token' # x (/)
38
38
)
You can’t perform that action at this time.
0 commit comments