From b7a9e29cf0e0fb57c8b5836657fe29212bccac7e Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 28 Mar 2020 04:58:28 +0000 Subject: [PATCH] fixup! WIP: 'main': Add some in_param/in_alias checks by code inspection --- highlighters/main/main-highlighter.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 1cef81b..de52167 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -1141,13 +1141,14 @@ _zsh_highlight_main_highlighter_check_assign() _zsh_highlight_main_highlighter_highlight_path_separators() { - if (( in_param || in_alias )); then - return - fi local pos style_pathsep style_pathsep=$1_pathseparator reply=() - [[ -z "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" || "$ZSH_HIGHLIGHT_STYLES[$1]" == "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" ]] && return 0 + if (( in_param || in_alias )) || + [[ -z "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" || "$ZSH_HIGHLIGHT_STYLES[$1]" == "$ZSH_HIGHLIGHT_STYLES[$style_pathsep]" ]] + then + return 0 + fi for (( pos = start_pos; $pos <= end_pos; pos++ )) ; do if [[ $BUFFER[pos] == / ]]; then reply+=($((pos - 1)) $pos $style_pathsep)