From 417ad9d430518859156bb3b629e82ed14a043e40 Mon Sep 17 00:00:00 2001 From: Aidan Epstein Date: Thu, 20 Sep 2018 14:58:57 +0000 Subject: Fix Bracketed Paste Mode when input contains end sequence. (#1243) * Fix Bracketed Paste Mode when input contains end sequence. * Remove \x1b instead of just the paste end sequence. --- src/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/input.rs b/src/input.rs index 3c20fe36..f4978336 100644 --- a/src/input.rs +++ b/src/input.rs @@ -285,7 +285,7 @@ impl Action { fn paste(&self, ctx: &mut A, contents: String) { if ctx.terminal_mode().contains(TermMode::BRACKETED_PASTE) { ctx.write_to_pty(&b"\x1b[200~"[..]); - ctx.write_to_pty(contents.into_bytes()); + ctx.write_to_pty(contents.replace("\x1b","").into_bytes()); ctx.write_to_pty(&b"\x1b[201~"[..]); } else { // In non-bracketed (ie: normal) mode, terminal applications cannot distinguish -- cgit