mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2025-02-16 11:08:23 +00:00
*highlight: Optimization: compress '))' code. Also fix the style used
This commit is contained in:
parent
ced97ae261
commit
3414b244e4
1 changed files with 2 additions and 4 deletions
|
@ -473,10 +473,8 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
|||
# ADD
|
||||
reply+=("$start_pos $(( start_pos + 2 )) ${HSMW_HIGHLIGHT_STYLES[reserved-word]}")
|
||||
already_added=1
|
||||
if [[ $arg[-2,-1] == '))' ]]; then
|
||||
# ADD
|
||||
reply+=("$(( end_pos - 2 )) $end_pos ${HSMW_HIGHLIGHT_STYLES[$style]}")
|
||||
fi
|
||||
# ADD
|
||||
[[ $arg[-2,-1] == '))' ]] && reply+=("$(( end_pos - 2 )) $end_pos ${HSMW_HIGHLIGHT_STYLES[reserved-word]}")
|
||||
elif [[ $arg == '()' ]]; then
|
||||
# anonymous function
|
||||
style=reserved-word
|
||||
|
|
Loading…
Add table
Reference in a new issue