play well with zsh-syntax-highlight

This commit is contained in:
Stanislav Seletskiy 2016-04-22 11:35:37 +06:00
parent 87facd9b85
commit 89e1243c43
3 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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