mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-02-06 09:55:30 +08:00
play well with zsh-syntax-highlight
This commit is contained in:
parent
87facd9b85
commit
89e1243c43
@ -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
|
||||
|
@ -119,6 +119,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
|
||||
@ -426,4 +430,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