From 08b04f5df2b9a4747b8f8975785bdcd523d85445 Mon Sep 17 00:00:00 2001 From: mickk-on-cpp Date: Fri, 28 Feb 2020 17:27:16 +0100 Subject: [PATCH] fancy-ctrl-z: ensure widgets are called with full context (#4838) 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. See https://github.com/tarruda/zsh-autosuggestions/issues/82#issuecomment-181133379 --- plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh index 8ab297913..82b968894 100644 --- a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh +++ b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh @@ -1,10 +1,10 @@ fancy-ctrl-z () { if [[ $#BUFFER -eq 0 ]]; then BUFFER="fg" - zle accept-line + zle accept-line -w else - zle push-input - zle clear-screen + zle push-input -w + zle clear-screen -w fi } zle -N fancy-ctrl-z