Skip to content

Commit

Permalink
fix(cli): fix the detach message
Browse files Browse the repository at this point in the history
Keys are interpreted on the server after commit 5a437b7
("refactor(server): interpret keys on server so they can be rebound").

Since the server exits with "ExitReason::Normal" instead of
"ExitReason::NormalDetached" when detaching a session, the detach
message becomes "Bye from Zellij!" instead of "Session detached".

Correct the exit reason to fix this.

Fixes: zellij-org#3798
  • Loading branch information
louiswpf committed Nov 22, 2024
1 parent 09689ea commit f8e0cd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zellij-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,10 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
},
ServerInstruction::DetachSession(client_ids) => {
for client_id in client_ids {
let _ = os_input
.send_to_client(client_id, ServerToClientMsg::Exit(ExitReason::Normal));
let _ = os_input.send_to_client(
client_id,
ServerToClientMsg::Exit(ExitReason::NormalDetached),
);
remove_client!(client_id, os_input, session_state);
if let Some(min_size) = session_state.read().unwrap().min_client_terminal_size()
{
Expand Down

0 comments on commit f8e0cd4

Please # to comment.