fix(cli): tab and pane name input (#3295)

This commit is contained in:
Aram Drevekenin 2024-04-24 11:56:49 +02:00 committed by GitHub
parent 9824557d0d
commit 18eff3fde9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,10 +64,11 @@ pub fn start_cli_client(
); );
}, },
action => { action => {
single_message_client(&mut os_input, action, pane_id); individual_messages_client(&mut os_input, action, pane_id);
}, },
} }
} }
os_input.send_to_server(ClientToServerMsg::ClientExited);
} }
fn pipe_client( fn pipe_client(
@ -198,7 +199,7 @@ fn pipe_client(
} }
} }
fn single_message_client( fn individual_messages_client(
os_input: &mut Box<dyn ClientOsApi>, os_input: &mut Box<dyn ClientOsApi>,
action: Action, action: Action,
pane_id: Option<u32>, pane_id: Option<u32>,
@ -208,12 +209,11 @@ fn single_message_client(
loop { loop {
match os_input.recv_from_server() { match os_input.recv_from_server() {
Some((ServerToClientMsg::UnblockInputThread, _)) => { Some((ServerToClientMsg::UnblockInputThread, _)) => {
os_input.send_to_server(ClientToServerMsg::ClientExited); break;
process::exit(0);
}, },
Some((ServerToClientMsg::Log(log_lines), _)) => { Some((ServerToClientMsg::Log(log_lines), _)) => {
log_lines.iter().for_each(|line| println!("{line}")); log_lines.iter().for_each(|line| println!("{line}"));
process::exit(0); break;
}, },
Some((ServerToClientMsg::LogError(log_lines), _)) => { Some((ServerToClientMsg::LogError(log_lines), _)) => {
log_lines.iter().for_each(|line| eprintln!("{line}")); log_lines.iter().for_each(|line| eprintln!("{line}"));
@ -225,7 +225,7 @@ fn single_message_client(
process::exit(2); process::exit(2);
}, },
_ => { _ => {
process::exit(0); break;
}, },
}, },
_ => {}, _ => {},