mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-25 04:40:21 +00:00
*highlight: Optimization: short path for ';'
Values at 15xx level started to again appear quite much often. parse.zsh -oo, after changes: Running time: 1.5699860000 num calls time self name ----------------------------------------------------------------------------------- 1) 350 1561,31 4,46 99,99% 1197,84 3,42 76,71% -hsmw-highlight-process 2) 2800 288,12 0,10 18,45% 288,12 0,10 18,45% -hsmw-highlight-string 3) 1750 41,02 0,02 2,63% 41,02 0,02 2,63% -hsmw-highlight-check-path 4) 1400 24,56 0,02 1,57% 24,56 0,02 1,57% -hsmw-highlight-main-type 5) 350 9,77 0,03 0,63% 9,77 0,03 0,63% -hsmw-highlight-stack-pop 6) 1 0,09 0,09 0,01% 0,09 0,09 0,01% -hsmw-highlight-fill-option-variables 7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
This commit is contained in:
parent
f34e89afa6
commit
12e631cd29
1 changed files with 8 additions and 0 deletions
|
@ -318,6 +318,14 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
|||
proc_buf="${proc_buf[offset + $#arg + 1,len]}"
|
||||
start_pos=$end_pos
|
||||
continue
|
||||
else
|
||||
# One more short path – for ';' command separator
|
||||
(( in_array_assignment )) && (( this_word = 2 )) || { (( this_word = 1 )); highlight_glob=1; }
|
||||
in_redirection=0
|
||||
[[ "${HSMW_HIGHLIGHT_STYLES[commandseparator]}" != "none" ]] && reply+=("$start_pos $end_pos ${HSMW_HIGHLIGHT_STYLES[commandseparator]}")
|
||||
proc_buf="${proc_buf[offset + $#arg + 1,len]}"
|
||||
start_pos=$end_pos
|
||||
continue
|
||||
fi
|
||||
|
||||
arg_type=3
|
||||
|
|
Loading…
Reference in a new issue