From 590c1cd84ca0157bf41fdd8ad87313125644ea5f Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Sat, 15 May 2021 08:22:14 +0300 Subject: [PATCH] Disable ^C async workaround for zsh version 5.8 and later --- src/async.zsh | 3 ++- zsh-autosuggestions.zsh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/async.zsh b/src/async.zsh index 4314e8c..218eb26 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -44,7 +44,8 @@ _zsh_autosuggest_async_request() { # There's a weird bug here where ^C stops working unless we force a fork # See https://github.com/zsh-users/zsh-autosuggestions/issues/364 - command true + autoload -Uz is-at-least + is-at-least 5.8 || command true # Read the pid from the child process read _ZSH_AUTOSUGGEST_CHILD_PID <&$_ZSH_AUTOSUGGEST_ASYNC_FD diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index ee9d800..21a4b42 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -810,7 +810,8 @@ _zsh_autosuggest_async_request() { # There's a weird bug here where ^C stops working unless we force a fork # See https://github.com/zsh-users/zsh-autosuggestions/issues/364 - command true + autoload -Uz is-at-least + is-at-least 5.8 || command true # Read the pid from the child process read _ZSH_AUTOSUGGEST_CHILD_PID <&$_ZSH_AUTOSUGGEST_ASYNC_FD