From 29332ca68490e907b7b9159d41b1a90efbe5c8a1 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Mon, 20 Jun 2022 20:25:29 +0200 Subject: [PATCH] add: debug information for certain actions (#1533) --- zellij-client/src/input_handler.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zellij-client/src/input_handler.rs b/zellij-client/src/input_handler.rs index 7c35fa3c..18ccf35b 100644 --- a/zellij-client/src/input_handler.rs +++ b/zellij-client/src/input_handler.rs @@ -232,8 +232,6 @@ impl InputHandler { // Actions, that are independent from the specific client // and not session idempotent should be specified here Action::NewTab(_) - | Action::CloseFocus - | Action::CloseTab | Action::Run(_) | Action::NewPane(_) | Action::WriteChars(_) @@ -246,7 +244,13 @@ impl InputHandler { | Action::ToggleFocusFullscreen | Action::Write(_) => { let client_id = clients.first().unwrap(); - log::error!("Sending action to client: {}", client_id); + log::debug!("Sending action to client: {}", client_id); + self.dispatch_action(action, Some(*client_id)); + }, + Action::CloseFocus | Action::CloseTab => { + let client_id = clients.first().unwrap(); + log::debug!("Sending action to client: {}", client_id); + log::warn!("Running this action from the focused pane, can lead to unexpected behaviour."); self.dispatch_action(action, Some(*client_id)); }, _ => {