diff options
| author | Aram Drevekenin <aram@poor.dev> | 2022-04-13 10:05:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-13 10:05:38 +0200 |
| commit | b185f2827f3871d6bdfc77f529d792beb0a28700 (patch) | |
| tree | 3f165056cbc21332f2a8426afb4f050a7efa557b | |
| parent | docs(changelog): XTWINOPS 14 + 16 (diff) | |
| download | sl0ppij-b185f2827f3871d6bdfc77f529d792beb0a28700.tar.gz sl0ppij-b185f2827f3871d6bdfc77f529d792beb0a28700.tar.xz sl0ppij-b185f2827f3871d6bdfc77f529d792beb0a28700.zip | |
fix(multiuser): properly clear UI when a user detaches (#1317)
| -rw-r--r-- | src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap | 2 | ||||
| -rw-r--r-- | zellij-server/src/lib.rs | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap index f7d0dce7..af538e25 100644 --- a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap +++ b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap @@ -5,7 +5,7 @@ expression: last_snapshot --- Zellij (e2e-test) Tab #1 ┌ Pane #1 ─────────────────────────────────────────────────┐┌ Pane #2 ─────────────────────────────────────────────────┐ -│$ ││$ I am some text█ │ +│$ █ ││$ I am some text │ │ ││ │ │ ││ │ │ ││ │ diff --git a/zellij-server/src/lib.rs b/zellij-server/src/lib.rs index 13d2f5c5..88f85013 100644 --- a/zellij-server/src/lib.rs +++ b/zellij-server/src/lib.rs @@ -477,6 +477,22 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) { .send_to_screen(ScreenInstruction::TerminalResize(min_size)) .unwrap(); } + session_data + .write() + .unwrap() + .as_ref() + .unwrap() + .senders + .send_to_screen(ScreenInstruction::RemoveClient(client_id)) + .unwrap(); + session_data + .write() + .unwrap() + .as_ref() + .unwrap() + .senders + .send_to_plugin(PluginInstruction::RemoveClient(client_id)) + .unwrap(); } ServerInstruction::Render(serialized_output) => { let client_ids = session_state.read().unwrap().client_ids(); |
