mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-22 03:13:09 +00:00
*highlight: Compress path separator highlighting code
This commit is contained in:
parent
11ccea242b
commit
24aa05d2f7
1 changed files with 2 additions and 4 deletions
|
@ -612,10 +612,8 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
|||
style_pathsep=${style}_pathseparator
|
||||
[[ -z "$HSMW_HIGHLIGHT_STYLES[$style_pathsep]" || "$HSMW_HIGHLIGHT_STYLES[$style]" == "$HSMW_HIGHLIGHT_STYLES[$style_pathsep]" ]] && return 0
|
||||
for (( pos = start_pos; $pos <= end_pos; pos++ )) ; do
|
||||
if [[ ${buf[pos]} == "/" ]]; then
|
||||
# ADD
|
||||
reply+=("$(( pos - 1 )) $pos ${HSMW_HIGHLIGHT_STYLES[$style_pathsep]}")
|
||||
fi
|
||||
# ADD
|
||||
[[ ${buf[pos]} == "/" ]] && reply+=("$(( pos - 1 )) $pos ${HSMW_HIGHLIGHT_STYLES[$style_pathsep]}")
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue