diff --git a/src/widgets.zsh b/src/widgets.zsh index ee1129f..6c03857 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -24,7 +24,7 @@ _zsh_autosuggest_modify() { # Get a new suggestion if the buffer is not empty after modification local suggestion - if [ $#BUFFER -gt 0 ]; then + if [ $#BUFFER -gt 0 -a $#BUFFER -lt 20 ]; then suggestion="$(_zsh_autosuggest_suggestion "$BUFFER")" fi diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 4e3c62e..7a74ab0 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -242,7 +242,7 @@ _zsh_autosuggest_modify() { # Get a new suggestion if the buffer is not empty after modification local suggestion - if [ $#BUFFER -gt 0 ]; then + if [ $#BUFFER -gt 0 -a $#BUFFER -lt 20 ]; then suggestion="$(_zsh_autosuggest_suggestion "$BUFFER")" fi