minor: 'main': Only search for prefixes if :h is a directory

This commit is contained in:
Matthew Martin 2016-06-01 00:54:30 -05:00
parent f060622dc6
commit 91fa057a39

View file

@ -580,7 +580,7 @@ _zsh_highlight_main_highlighter_check_path()
done
# If dirname($arg) doesn't exist, neither does $arg.
[[ ! -e ${expanded_path:h} ]] && return 1
[[ ! -d ${expanded_path:h} ]] && return 1
# If this word ends the buffer, check if it's the prefix of a valid path.
if [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos ]] &&