Validate original widget name when restoring on

autosuggest-pause
This commit is contained in:
Thiago de Arruda 2013-11-08 11:49:33 -03:00
parent 6ddbde147f
commit 8af98f7d29

View file

@ -51,7 +51,8 @@ autosuggest-pause() {
zle -A autosuggest-backward-delete-char-orig backward-delete-char
zle -A autosuggest-accept-line-orig accept-line
for widget in $ZLE_AUTOSUGGEST_ACCEPT_WIDGETS $ZLE_AUTOSUGGEST_SUSPEND_WIDGETS $ZLE_AUTOSUGGEST_COMPLETION_WIDGETS; do
[[ -z $widgets[$widget] ]] && continue
[[ -z $widgets[$widget] || -z $widgets[autosuggest-${widget}-orig] ]] &&\
continue
eval "zle -A autosuggest-${widget}-orig ${widget}"
done
autosuggest-highlight-suggested-text