From 3f57198d0791dc6a176aab887673dbe6c276abaa Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Thu, 26 Jan 2017 16:11:01 -0700 Subject: [PATCH] Only bind widgets once, on initial sourcing --- src/start.zsh | 2 ++ zsh-autosuggestions.zsh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/start.zsh b/src/start.zsh index 5314e1f..ab60afe 100644 --- a/src/start.zsh +++ b/src/start.zsh @@ -5,6 +5,8 @@ # Start the autosuggestion widgets _zsh_autosuggest_start() { + add-zsh-hook -d precmd _zsh_autosuggest_start + _zsh_autosuggest_check_deprecated_config _zsh_autosuggest_bind_widgets } diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index a6cbe05..c635630 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -568,6 +568,8 @@ add-zsh-hook precmd _zsh_autosuggest_async_recreate_pty # Start the autosuggestion widgets _zsh_autosuggest_start() { + add-zsh-hook -d precmd _zsh_autosuggest_start + _zsh_autosuggest_check_deprecated_config _zsh_autosuggest_bind_widgets }