diff options
author | Aidan Epstein <aidan@jmad.org> | 2018-09-20 14:58:57 +0000 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-09-20 07:58:57 -0700 |
commit | 417ad9d430518859156bb3b629e82ed14a043e40 (patch) | |
tree | f77f9c2fa9f8b5abfe16efb3a5a82010f290b08d | |
parent | 177a5c39c35d00588b2e1e04aa20697611161afb (diff) | |
download | alacritty-417ad9d430518859156bb3b629e82ed14a043e40.tar.gz alacritty-417ad9d430518859156bb3b629e82ed14a043e40.zip |
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.
-rw-r--r-- | src/input.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<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 |