Commit 417ad9d4 authored by Aidan Epstein's avatar Aidan Epstein Committed by Joe Wilm

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.
parent 177a5c39
......@@ -285,7 +285,7 @@ impl Action {
fn paste<A: ActionContext>(&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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment