Subject: Re: Bug in bracketed-paste-magic?
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Sun, 14 Feb 2016 11:29:55 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Feb 13,  8:42pm, Eric Freese wrote:
}
} making a call to `zle` without the `-w` flag. It seems to me this is a bug

Just for zsh-workers reference, here is the patch:

diff --git a/Functions/Zle/bracketed-paste-magic
b/Functions/Zle/bracketed-paste-magic
index 2b2bc63..498cf55 100644
--- a/Functions/Zle/bracketed-paste-magic
+++ b/Functions/Zle/bracketed-paste-magic
@@ -175,7 +175,7 @@ bracketed-paste-magic() {
 		case $REPLY in
 		    (${~bpm_active}) function () {
 			emulate -L $bpm_emulate; set -$bpm_opts
-			zle $REPLY
+			zle $REPLY -w
 		    };;
 		    (*) zle .self-insert;;
 		esac
@@ -184,7 +184,7 @@ bracketed-paste-magic() {
 	PASTED=$BUFFER
 
 	# Reset the undo state
-	zle undo $bpm_undo
+	zle .undo $bpm_undo
 	UNDO_LIMIT_NO=$bpm_limit
 
 	zle -K $bpm_keymap