Skip to content

Commit 590c1cd

Browse files
committed
Disable ^C async workaround for zsh version 5.8 and later
1 parent 58c98a7 commit 590c1cd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/async.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ _zsh_autosuggest_async_request() {
4444

4545
# There's a weird bug here where ^C stops working unless we force a fork
4646
# See https://github.com/zsh-users/zsh-autosuggestions/issues/364
47-
command true
47+
autoload -Uz is-at-least
48+
is-at-least 5.8 || command true
4849

4950
# Read the pid from the child process
5051
read _ZSH_AUTOSUGGEST_CHILD_PID <&$_ZSH_AUTOSUGGEST_ASYNC_FD

zsh-autosuggestions.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,8 @@ _zsh_autosuggest_async_request() {
810810

811811
# There's a weird bug here where ^C stops working unless we force a fork
812812
# See https://github.com/zsh-users/zsh-autosuggestions/issues/364
813-
command true
813+
autoload -Uz is-at-least
814+
is-at-least 5.8 || command true
814815

815816
# Read the pid from the child process
816817
read _ZSH_AUTOSUGGEST_CHILD_PID <&$_ZSH_AUTOSUGGEST_ASYNC_FD

0 commit comments

Comments
 (0)