From 6dbb419a7aecf967fc4e945811c711c0fa0dc93f Mon Sep 17 00:00:00 2001 From: Maksim Ryzhikov Date: Mon, 11 Aug 2014 10:25:21 +0400 Subject: [PATCH] fix:Add autosuggest to highlighters list only once --- autosuggestions.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autosuggestions.zsh b/autosuggestions.zsh index 456b011..9c3dea0 100644 --- a/autosuggestions.zsh +++ b/autosuggestions.zsh @@ -100,7 +100,9 @@ autosuggest-resume() { autosuggest-start() { if [[ -z $ZLE_DISABLE_AUTOSUGGEST && -n $functions[_zsh_highlight] ]]; then - ZSH_HIGHLIGHT_HIGHLIGHTERS+=(autosuggest) + if [[ ${ZSH_HIGHLIGHT_HIGHLIGHTERS[(i)autosuggest]} -gt ${#ZSH_HIGHLIGHT_HIGHLIGHTERS} ]];then + ZSH_HIGHLIGHT_HIGHLIGHTERS+=(autosuggest) + fi fi autosuggest-resume }