diff --git a/src/async.zsh b/src/async.zsh index 2e23fb6..566a81a 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -10,6 +10,8 @@ _zsh_autosuggest_async_fetch_suggestion() { # Pty is spawned running this function _zsh_autosuggest_async_suggestion_server() { + emulate -R zsh + while read -d $'\0' prefix; do # Kill last bg process kill -KILL %1 &>/dev/null diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index f85aac6..d8f1103 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -487,6 +487,8 @@ _zsh_autosuggest_async_fetch_suggestion() { # Pty is spawned running this function _zsh_autosuggest_async_suggestion_server() { + emulate -R zsh + while read -d $'\0' prefix; do # Kill last bg process kill -KILL %1 &>/dev/null