mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2026-11-28 03:13:06 +01:00
Enabling suggestions should not fetch a suggestion if buffer is empty
This commit is contained in:
1 parent
7d4a1d9a4a
commit
a2f0ffb122
5 files changed
+77
-7
No files matched your search
+4
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user