mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 04:10:07 +00:00
work around bugs in add-zle-hook-widget (#1238)
This commit is contained in:
parent
d26bdcd601
commit
b816abfed0
1 changed files with 9 additions and 3 deletions
|
@ -7584,9 +7584,15 @@ function _p9k_wrap_widgets() {
|
|||
if (( ! $+functions[_p9k_widget_$widget] )); then
|
||||
functions[_p9k_widget_$widget]='_p9k_widget '${(q)widget}' "$@"'
|
||||
fi
|
||||
if [[ $widget == zle-* &&
|
||||
$widgets[$widget] == user:azhw:* &&
|
||||
$functions[add-zle-hook-widget] ]]; then
|
||||
add-zle-hook-widget $widget _p9k_widget_$widget
|
||||
else
|
||||
# The leading dot is to work around bugs in zsh-syntax-highlighting.
|
||||
zle -A $widget ._p9k_orig_$widget
|
||||
zle -N $widget _p9k_widget_$widget
|
||||
fi
|
||||
done 2>/dev/null # `zle -A` fails for inexisting widgets and complains to stderr
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue