fix(action): correctly dispatch the Write action (#1518)

The  `Write` action should be called once per session.
This commit is contained in:
a-kenji 2022-06-16 18:34:19 +02:00 committed by GitHub
parent 05532c24ce
commit 35498b6030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,8 +234,12 @@ impl InputHandler {
break;
},
// Actions, that are indepenedent from the specific client
// should be specified here.
Action::NewTab(_) | Action::Run(_) | Action::NewPane(_) | Action::WriteChars(_) => {
// and not session idempotent should be specified here
Action::NewTab(_)
| Action::Run(_)
| Action::NewPane(_)
| Action::WriteChars(_)
| Action::Write(_) => {
let client_id = clients.first().unwrap();
log::error!("Sending action to client: {}", client_id);
self.dispatch_action(action, Some(*client_id));