From e87bc74654268c51541bae3ca526a2b3a702dc13 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Mon, 25 Apr 2016 14:42:09 -0600 Subject: [PATCH] Fix 118: Clear suggestion before original widget to fix completions See PR #149 --- src/widgets.zsh | 3 +++ zsh-autosuggestions.zsh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/widgets.zsh b/src/widgets.zsh index f6b7bfa..ee1129f 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -15,6 +15,9 @@ _zsh_autosuggest_clear() { _zsh_autosuggest_modify() { local -i retval + # Clear suggestion while original widget runs + unset POSTDISPLAY + # Original widget modifies the buffer _zsh_autosuggest_invoke_original_widget $@ retval=$? diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 68438d4..65d2a17 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -233,6 +233,9 @@ _zsh_autosuggest_clear() { _zsh_autosuggest_modify() { local -i retval + # Clear suggestion while original widget runs + unset POSTDISPLAY + # Original widget modifies the buffer _zsh_autosuggest_invoke_original_widget $@ retval=$?