diff options
| author | Aram Drevekenin <aram@poor.dev> | 2021-05-12 14:22:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-12 14:22:15 +0200 |
| commit | 3f1ec7c29590fea0805e7effb605548606b58306 (patch) | |
| tree | 7f4d622d9c945225f21b4d8f15090ca6e0223a27 /src/client | |
| parent | docs(changelog): compatibility update (diff) | |
| download | sl0ppij-3f1ec7c29590fea0805e7effb605548606b58306.tar.gz sl0ppij-3f1ec7c29590fea0805e7effb605548606b58306.tar.xz sl0ppij-3f1ec7c29590fea0805e7effb605548606b58306.zip | |
fix(ui): handle pasted text properly (#494)
* fix(ui): handle pasted text properly
* style(fmt): rustfmt
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 5fb40096..ae60fc87 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -31,8 +31,9 @@ pub enum ClientInstruction { } pub fn start_client(mut os_input: Box<dyn ClientOsApi>, opts: CliArgs, config: Config) { - let clear_client_terminal_attributes = "\u{1b}[?1l\u{1b}=\u{1b}[r\u{1b}12l\u{1b}[?1000l\u{1b}[?1002l\u{1b}[?1003l\u{1b}[?1005l\u{1b}[?1006l"; + let clear_client_terminal_attributes = "\u{1b}[?1l\u{1b}=\u{1b}[r\u{1b}12l\u{1b}[?1000l\u{1b}[?1002l\u{1b}[?1003l\u{1b}[?1005l\u{1b}[?1006l\u{1b}[?12l"; let take_snapshot = "\u{1b}[?1049h"; + let bracketed_paste = "\u{1b}[?2004h"; os_input.unset_raw_mode(0); let _ = os_input .get_stdout_writer() @@ -57,6 +58,10 @@ pub fn start_client(mut os_input: Box<dyn ClientOsApi>, opts: CliArgs, config: C config_options, )); os_input.set_raw_mode(0); + let _ = os_input + .get_stdout_writer() + .write(bracketed_paste.as_bytes()) + .unwrap(); let (send_client_instructions, receive_client_instructions): SyncChannelWithContext< ClientInstruction, |
