mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-25 04:40:21 +00:00
*highlight: Optimization: compress code handling braces, always block
parse.zsh -oo, after changes: Running time: 1.7983390000 num calls time self name ----------------------------------------------------------------------------------- 1) 350 1790,84 5,12 99,99% 1316,27 3,76 73,50% -hsmw-highlight-process 2) 2800 335,29 0,12 18,72% 335,29 0,12 18,72% -hsmw-highlight-string 3) 2450 80,24 0,03 4,48% 80,24 0,03 4,48% -hsmw-highlight-check-path 4) 1400 41,35 0,03 2,31% 41,35 0,03 2,31% -hsmw-highlight-main-type 5) 350 9,70 0,03 0,54% 9,70 0,03 0,54% -hsmw-highlight-stack-pop 6) 350 7,99 0,02 0,45% 7,99 0,02 0,45% -hsmw-highlight-path-separators 7) 1 0,09 0,09 0,01% 0,09 0,09 0,01% -hsmw-highlight-fill-option-variables 8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
This commit is contained in:
parent
8996f4c281
commit
56aa7592b7
1 changed files with 2 additions and 4 deletions
|
@ -543,10 +543,8 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
|||
# tt(IGNORE_BRACES) option nor the tt(IGNORE_CLOSE_BRACES) option is set."""
|
||||
if (( right_brace_is_recognised_everywhere )); then
|
||||
-hsmw-highlight-stack-pop 'Y' style=reserved-word
|
||||
if [[ $style == reserved-word ]]; then
|
||||
(( next_word = next_word | BIT_always ))
|
||||
fi
|
||||
else
|
||||
[[ $style == reserved-word ]] && (( next_word = next_word | BIT_always ))
|
||||
#else
|
||||
# Fall through to the catchall case at the end.
|
||||
fi
|
||||
;|
|
||||
|
|
Loading…
Reference in a new issue