Disable autosuggest if buffer is too large

This commit is contained in:
Lorenzo Bolla 2016-07-15 09:39:33 +01:00
parent 62cdba4e0f
commit 9572ccbea2
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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