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=$?