Skip to content

Commit

Permalink
Disable autosuggest if buffer is too large
Browse files Browse the repository at this point in the history
  • Loading branch information
lbolla committed Jul 15, 2016
1 parent 62cdba4 commit 9572ccb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/widgets.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion zsh-autosuggestions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9572ccb

Please sign in to comment.