From 85d1268b5a7c6534213fbcce876ff2c7ebe4cba7 Mon Sep 17 00:00:00 2001 From: jimmijj Date: Tue, 23 Sep 2014 22:51:49 +0000 Subject: [PATCH] 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 --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 1b758be..e6d9b88 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -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) )