Ensure widgets are called with full context.

This allows other plugins that hook e.g. accept-line to identify the
fancy-ctrl-z widget as the caller and take appropriate steps when
necessary.
This commit is contained in:
lucdanton 2015-12-04 09:40:39 +01:00
parent a38d7cf54a
commit ab9858c585

View File

@ -1,10 +1,10 @@
fancy-ctrl-z () { fancy-ctrl-z () {
if [[ $#BUFFER -eq 0 ]]; then if [[ $#BUFFER -eq 0 ]]; then
BUFFER="fg" BUFFER="fg"
zle accept-line zle accept-line -w
else else
zle push-input zle push-input -w
zle clear-screen zle clear-screen -w
fi fi
} }
zle -N fancy-ctrl-z zle -N fancy-ctrl-z