diff --git a/src/widgets.zsh b/src/widgets.zsh index 7fb1183..450ed3c 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -85,7 +85,7 @@ _zsh_autosuggest_modify() { # Get a new suggestion if the buffer is not empty after modification if (( $#BUFFER > 0 )); then - if (( ! ${+ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE} )) || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then + if [[ -z "$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" ]] || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then _zsh_autosuggest_fetch fi fi diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index f6f6a84..16c6ccc 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -346,7 +346,7 @@ _zsh_autosuggest_modify() { # Get a new suggestion if the buffer is not empty after modification if (( $#BUFFER > 0 )); then - if (( ! ${+ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE} )) || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then + if [[ -z "$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" ]] || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then _zsh_autosuggest_fetch fi fi