mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-04-17 11:35:31 +08:00
Merge 89e1243c43
into fedc22e9bb
This commit is contained in:
commit
ace6ccfc3f
@ -9,6 +9,10 @@ _zsh_autosuggest_bind_widget() {
|
||||
local autosuggest_action=$2
|
||||
local prefix=$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX
|
||||
|
||||
if zle -l $prefix$widget; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Save a reference to the original widget
|
||||
case $widgets[$widget] in
|
||||
# Already bound
|
||||
|
@ -10,4 +10,5 @@ _zsh_autosuggest_start() {
|
||||
}
|
||||
|
||||
autoload -Uz add-zsh-hook
|
||||
add-zsh-hook -d precmd _zsh_autosuggest_start
|
||||
add-zsh-hook precmd _zsh_autosuggest_start
|
||||
|
@ -133,6 +133,10 @@ _zsh_autosuggest_bind_widget() {
|
||||
local autosuggest_action=$2
|
||||
local prefix=$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX
|
||||
|
||||
if zle -l $prefix$widget; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Save a reference to the original widget
|
||||
case $widgets[$widget] in
|
||||
# Already bound
|
||||
@ -470,4 +474,5 @@ _zsh_autosuggest_start() {
|
||||
}
|
||||
|
||||
autoload -Uz add-zsh-hook
|
||||
add-zsh-hook -d precmd _zsh_autosuggest_start
|
||||
add-zsh-hook precmd _zsh_autosuggest_start
|
||||
|
Loading…
Reference in New Issue
Block a user