mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
play well with zsh-syntax-highlight
This commit is contained in:
parent
87facd9b85
commit
89e1243c43
3 changed files with 10 additions and 0 deletions
|
@ -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 a new issue