mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-01-30 09:47:12 +08:00
Disable autosuggest if buffer is too large
This commit is contained in:
parent
62cdba4e0f
commit
9572ccbea2
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user