fix(action): send WriteChars once per action (#1516)

`WriteChars` is not an idempotent action, that's why it should only
be sent to it's destination client.
This commit is contained in:
a-kenji 2022-06-16 15:20:23 +02:00 committed by GitHub
parent 3ccc1f3946
commit 2563fbb441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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