From d877073959ba4b86da968f63be320875a0f0c2a7 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 8 Jun 2012 07:55:27 +0200 Subject: 47305: edit-command-line: when possible, set $BUFFER directly This avoids the send-break which is both visually unappealing and might break some use cases where the user wishes to wrap edit-command-line in another widget. --- Functions/Zle/edit-command-line | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line index 991775ea5..1103ca556 100644 --- a/Functions/Zle/edit-command-line +++ b/Functions/Zle/edit-command-line @@ -7,6 +7,11 @@ # except that it will handle multi-line buffers properly. emulate -L zsh +local prebuffer +# see below comment for why this is needed +if (( ! ZLE_RECURSIVE )); then + prebuffer=$PREBUFFER +fi () { exec