Merge pull request #31 from maksimr/patch-1

fix:Add autosuggest to highlighters list only once
This commit is contained in:
Michael Robinson 2014-12-09 15:45:18 +13:00
commit 7446059f63

View file

@ -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
}