diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 194e063..20be0c6 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -173,8 +173,9 @@ _zsh_autosuggest_bind_widget() { # Completion widget completion:*) _zsh_autosuggest_incr_bind_count $widget -local -a widget_split=("${(@s.:.)widgets[$widget]}") -eval 'zle -C "$prefix$bind_count-${(q)widget}" "${widget_split[2]}" "${widget_split[3]}"' ;; + local -a widget_split=("${(@s.:.)widgets[$widget]}") + eval 'zle -C "$prefix$bind_count-${(q)widget}" "${widget_split[2]}" "${widget_split[3]}"' + ;; esac # Pass the original widget's name explicitly into the autosuggest