diff options
| author | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-12 22:27:25 +0530 |
|---|---|---|
| committer | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-15 22:14:34 +0530 |
| commit | 41212dc0e8b139fccac443297c06b9478857d5ea (patch) | |
| tree | 125055787a3960bd94d1a97c312ea01760e4362c /src/client | |
| parent | fix testing (diff) | |
| download | sl0ppij-41212dc0e8b139fccac443297c06b9478857d5ea.tar.gz sl0ppij-41212dc0e8b139fccac443297c06b9478857d5ea.tar.xz sl0ppij-41212dc0e8b139fccac443297c06b9478857d5ea.zip | |
Fix after rebase
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/mod.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index c1458b1a..2fada592 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -17,6 +17,7 @@ use crate::common::{ errors::ContextType, input::config::Config, input::handler::input_loop, + input::options::Options, ipc::{ClientToServerMsg, ServerToClientMsg}, os_input_output::ClientOsApi, thread_bus::{SenderType, SenderWithContext, SyncChannelWithContext}, @@ -62,6 +63,7 @@ fn spawn_server(socket_path: &Path) -> io::Result<()> { } 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\u{1b}[?12l"; let take_snapshot = "\u{1b}[?1049h"; let bracketed_paste = "\u{1b}[?2004h"; os_input.unset_raw_mode(0); @@ -69,7 +71,10 @@ pub fn start_client(mut os_input: Box<dyn ClientOsApi>, opts: CliArgs, config: C .get_stdout_writer() .write(take_snapshot.as_bytes()) .unwrap(); - + let _ = os_input + .get_stdout_writer() + .write(clear_client_terminal_attributes.as_bytes()) + .unwrap(); std::env::set_var(&"ZELLIJ", "0"); #[cfg(not(test))] @@ -81,7 +86,11 @@ pub fn start_client(mut os_input: Box<dyn ClientOsApi>, opts: CliArgs, config: C let full_screen_ws = os_input.get_terminal_size_using_fd(0); os_input.connect_to_server(&*ZELLIJ_IPC_PIPE); - os_input.send_to_server(ClientToServerMsg::NewClient(full_screen_ws, opts)); + os_input.send_to_server(ClientToServerMsg::NewClient( + full_screen_ws, + opts, + config_options, + )); os_input.set_raw_mode(0); let _ = os_input .get_stdout_writer() |
