Enabling suggestions should not fetch a suggestion if buffer is empty

This commit is contained in:
Eric Freese
2017-03-04 17:04:04 -05:00
parent 7d4a1d9a4a
commit a2f0ffb122
5 changed files with 77 additions and 7 deletions

View File

@@ -12,7 +12,10 @@ _zsh_autosuggest_disable() {
# Enable suggestions
_zsh_autosuggest_enable() {
unset _ZSH_AUTOSUGGEST_DISABLED
_zsh_autosuggest_fetch
if [ $#BUFFER -gt 0 ]; then
_zsh_autosuggest_fetch
fi
}
# Toggle suggestions (enable/disable)