From 2e4c70638cec528901e346fbd11eb872db0256c0 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Mon, 24 Oct 2016 13:05:16 +0200 Subject: [PATCH] Optimization: initialize highlighting's cache only once per run --- history-search-multi-word | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/history-search-multi-word b/history-search-multi-word index c0417ac..4a693ea 100644 --- a/history-search-multi-word +++ b/history-search-multi-word @@ -42,6 +42,7 @@ _hsmw_main() { zstyle -s ":plugin:history-search-multi-word" synhl __hsmw_synhl || __hsmw_synhl="yes" zstyle -s ":plugin:history-search-multi-word" active __hsmw_active || __hsmw_active="underline" [[ "$__hsmw_synhl" != "1" && "$__hsmw_synhl" != "yes" && "$__hsmw_synhl" != "true" ]] && __hsmw_synhl="no" || __hsmw_synhl="yes" + -hsmw-highlight-init fi # '0' will get changed into $to_display limit @@ -128,7 +129,6 @@ _hsmw_main() { region_highlight=( ) if [[ "$__hsmw_synhl" = "yes" ]]; then - -hsmw-highlight-init integer pre_index=0 local line for line in "${disp_list[@]}"; do