diff --git a/src/widgets.zsh b/src/widgets.zsh index 1d125d0..450ed3c 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -95,7 +95,7 @@ _zsh_autosuggest_modify() { # Fetch a new suggestion based on what's currently in the buffer _zsh_autosuggest_fetch() { - if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then + if (( ${+ZSH_AUTOSUGGEST_USE_ASYNC} )); then _zsh_autosuggest_async_request "$BUFFER" else local suggestion diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index e7e14a1..bae4ba8 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -366,7 +366,7 @@ _zsh_autosuggest_modify() { # Fetch a new suggestion based on what's currently in the buffer _zsh_autosuggest_fetch() { - if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then + if (( ${+ZSH_AUTOSUGGEST_USE_ASYNC} )); then _zsh_autosuggest_async_request "$BUFFER" else local suggestion