aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2022-06-16 18:34:31 +0200
committerGitHub <noreply@github.com>2022-06-16 18:34:31 +0200
commit464f21aebd3f0adf44e41b7ebaf67cd952cbddbd (patch)
tree5a0da09f3f4b013c7531b037b2e9e2e0e4cacab0
parentfix(action): correctly dispatch the `Write` action (#1518) (diff)
downloadsl0ppij-464f21aebd3f0adf44e41b7ebaf67cd952cbddbd.tar.gz
sl0ppij-464f21aebd3f0adf44e41b7ebaf67cd952cbddbd.tar.xz
sl0ppij-464f21aebd3f0adf44e41b7ebaf67cd952cbddbd.zip
fix: clarify comments (#1519)
-rw-r--r--zellij-client/src/input_handler.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/zellij-client/src/input_handler.rs b/zellij-client/src/input_handler.rs
index d5bca190..cf3ab447 100644
--- a/zellij-client/src/input_handler.rs
+++ b/zellij-client/src/input_handler.rs
@@ -216,7 +216,6 @@ impl InputHandler {
}
}
fn handle_actions(&mut self, actions: Vec<Action>, session_name: &str, clients: Vec<ClientId>) {
- // TODO: handle Detach correctly
for action in actions {
match action {
Action::Quit => {
@@ -224,13 +223,10 @@ impl InputHandler {
break;
},
Action::Detach => {
- // self.should_exit = true;
- // clients.split_last().into_iter().for_each(|(client_id, _)| {
let first = clients.first().unwrap();
let last = clients.last().unwrap();
self.os_input
.send_to_server(ClientToServerMsg::DetachSession(vec![*first, *last]));
- // });
break;
},
// Actions, that are indepenedent from the specific client
@@ -245,7 +241,8 @@ impl InputHandler {
self.dispatch_action(action, Some(*client_id));
},
_ => {
- // TODO only dispatch for each client, for actions that need it
+ // FIXME: If a specific `session_id` is specified,
+ // then only send the actions to that specific `client_id`
for client_id in &clients {
self.dispatch_action(action.clone(), Some(*client_id));
}