Browse Source
Merge pull request #433 from zsh-users/fixes/ignore-empty-max-size
Allow setting max size to empty string (GitHub #422)
fixes/copy-earlier-word
Eric Freese
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
src/widgets.zsh
-
zsh-autosuggestions.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 |
|
|
|
|
|
@ -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 |
|
|
|