main: Explicitly pass $style to _highlight_path_separators
This commit is contained in:
parent
0458b0c16f
commit
6cc861fbad
@ -750,8 +750,8 @@ _zsh_highlight_main_highlighter_check_assign()
|
|||||||
_zsh_highlight_main_highlighter_highlight_path_separators()
|
_zsh_highlight_main_highlighter_highlight_path_separators()
|
||||||
{
|
{
|
||||||
local pos style_pathsep
|
local pos style_pathsep
|
||||||
style_pathsep=${style}_pathseparator
|
style_pathsep=$1_pathseparator
|
||||||
[[ -z "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" || "$ZSH_HIGHLIGHT_STYLES[$style]" == "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" ]] && return 0
|
[[ -z "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" || "$ZSH_HIGHLIGHT_STYLES[$1]" == "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" ]] && return 0
|
||||||
for (( pos = start_pos; $pos <= end_pos; pos++ )) ; do
|
for (( pos = start_pos; $pos <= end_pos; pos++ )) ; do
|
||||||
if [[ $BUFFER[pos] == / ]]; then
|
if [[ $BUFFER[pos] == / ]]; then
|
||||||
_zsh_highlight_main_add_region_highlight $((pos - 1)) $pos $style_pathsep
|
_zsh_highlight_main_add_region_highlight $((pos - 1)) $pos $style_pathsep
|
||||||
@ -841,7 +841,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
|||||||
if (( path_eligible )) && _zsh_highlight_main_highlighter_check_path; then
|
if (( path_eligible )) && _zsh_highlight_main_highlighter_check_path; then
|
||||||
style=$REPLY
|
style=$REPLY
|
||||||
_zsh_highlight_main_add_region_highlight $start_pos $end_pos $style
|
_zsh_highlight_main_add_region_highlight $start_pos $end_pos $style
|
||||||
_zsh_highlight_main_highlighter_highlight_path_separators
|
_zsh_highlight_main_highlighter_highlight_path_separators $style
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user