zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.95k stars 1.86k forks source link

[Bug] Continuously-defined functions when a widget contains a non-ascii character #585

Open xPMo opened 3 years ago

xPMo commented 3 years ago

To reproduce:

. ./zsh-autosuggestions.zsh
zle -N →demo

Then repeatedly run printf '%q\n' ${functions[(I)*demo]} and notice how the number of functions growing. Zsh-autosuggestions is not wrapping these functions correctly.

Please change this line to use the builtin $widgets array instead of parsing zle -la:

    for widget in ${${widgets:#${(j:|:)~ignore_widgets}}; do