Changed ${#BUFFER} to ${#LBUFFER} in function _zsh_highlight_main_highlighter_check_path() in order to allow edit in the middle of the line without losing path colors in some cases

This commit is contained in:
jimmijj 2014-09-23 22:51:49 +00:00
parent 1a8e14fad2
commit 85d1268b5a

View File

@ -191,7 +191,7 @@ _zsh_highlight_main_highlighter_check_path()
[[ -e "$cdpath_dir/$expanded_path" ]] && return 0
done
[[ ! -e ${expanded_path:h} ]] && return 1
if [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos ]]; then
if [[ ${BUFFER[1]} != "-" && ${#LBUFFER} == $end_pos ]]; then
local -a tmp
# got a path prefix?
tmp=( ${expanded_path}*(N) )