mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-02-13 10:05:31 +08:00
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:
parent
1a8e14fad2
commit
85d1268b5a
@ -191,7 +191,7 @@ _zsh_highlight_main_highlighter_check_path()
|
|||||||
[[ -e "$cdpath_dir/$expanded_path" ]] && return 0
|
[[ -e "$cdpath_dir/$expanded_path" ]] && return 0
|
||||||
done
|
done
|
||||||
[[ ! -e ${expanded_path:h} ]] && return 1
|
[[ ! -e ${expanded_path:h} ]] && return 1
|
||||||
if [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos ]]; then
|
if [[ ${BUFFER[1]} != "-" && ${#LBUFFER} == $end_pos ]]; then
|
||||||
local -a tmp
|
local -a tmp
|
||||||
# got a path prefix?
|
# got a path prefix?
|
||||||
tmp=( ${expanded_path}*(N) )
|
tmp=( ${expanded_path}*(N) )
|
||||||
|
Loading…
Reference in New Issue
Block a user