Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zellij-server: screen: Implement
active_tab!
as a convenience macro that attempts to get the currently active tab. If the tab is found, it executes a closure (passed by the caller) on this tab. Otherwise, a standardized error message is printed to the error log. This standardizes and deduplicates the loads of: ``` if let Some(active_tab) = screen.get_active_tab_mut(client_id) { active_tab.$FUNCTION(...); } else { log::error!("Active tab not found for client id: {:?}", client_id); } ``` previously present in the code.
- Loading branch information