Browse Source

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
mickk-on-cpp 4 years ago
parent
commit
08b04f5df2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh

+ 3 - 3
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