mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-11 22:02:31 +01:00
Merge fb418b90d3 into bc7f8ea433
This commit is contained in:
commit
e3c151eb4b
3 changed files with 15 additions and 8 deletions
|
|
@ -60,8 +60,8 @@
|
|||
# Whether the highlighter should be called or not.
|
||||
_zsh_highlight_main_highlighter_predicate()
|
||||
{
|
||||
# accept-* may trigger removal of path_prefix highlighting
|
||||
[[ $WIDGET == accept-* ]] ||
|
||||
# widgets which accept lines may trigger removal of path_prefix highlighting
|
||||
_zsh_highlight_is_accept_line_type_widget ||
|
||||
_zsh_highlight_buffer_modified
|
||||
}
|
||||
|
||||
|
|
@ -486,7 +486,7 @@ _zsh_highlight_main_highlighter_check_path()
|
|||
|
||||
# If this word ends the buffer, check if it's the prefix of a valid path.
|
||||
if [[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos ]] &&
|
||||
[[ $WIDGET != accept-* ]]; then
|
||||
! _zsh_highlight_is_accept_line_type_widget; then
|
||||
local -a tmp
|
||||
tmp=( ${expanded_path}*(N) )
|
||||
(( $#tmp > 0 )) && style_override=path_prefix && return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue