mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-12-23 10:21:15 +01:00
Validate original widget name when restoring on
autosuggest-pause
This commit is contained in:
parent
6ddbde147f
commit
8af98f7d29
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue