mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-24 20:33:04 +00:00
*highlight: Optimization: compress noglob-related code
parse.zsh -oo, after changes: Running time: 1.8347470000 num calls time self name ----------------------------------------------------------------------------------- 1) 350 1827,26 5,22 100,00% 1354,88 3,87 74,14% -hsmw-highlight-process 2) 2800 335,45 0,12 18,36% 335,45 0,12 18,36% -hsmw-highlight-string 3) 2450 79,78 0,03 4,37% 79,78 0,03 4,37% -hsmw-highlight-check-path 4) 1400 39,59 0,03 2,17% 39,59 0,03 2,17% -hsmw-highlight-main-type 5) 350 9,61 0,03 0,53% 9,61 0,03 0,53% -hsmw-highlight-stack-pop 6) 350 7,94 0,02 0,43% 7,94 0,02 0,43% -hsmw-highlight-path-separators 7) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -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
246f6e8627
commit
d266b62e7e
1 changed files with 1 additions and 3 deletions
|
@ -305,9 +305,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
||||||
style=unknown-token
|
style=unknown-token
|
||||||
if (( this_word & BIT_start )); then
|
if (( this_word & BIT_start )); then
|
||||||
in_array_assignment=0
|
in_array_assignment=0
|
||||||
if [[ $arg == 'noglob' ]]; then
|
[[ $arg == 'noglob' ]] && highlight_glob=0
|
||||||
highlight_glob=0
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compute the new $start_pos and $end_pos, skipping over whitespace in $buf.
|
# Compute the new $start_pos and $end_pos, skipping over whitespace in $buf.
|
||||||
|
|
Loading…
Reference in a new issue