diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-05-10 20:54:39 +0200 |
|---|---|---|
| committer | a-kenji <aks.kenji@protonmail.com> | 2021-05-10 20:54:39 +0200 |
| commit | 85a4e476f2011dc0491a15bcce3b0052ebb15adb (patch) | |
| tree | eb5d120250c5c3b0d74314a42129a857bf6b1afe /src/common/input | |
| parent | fixup! Add Option for Simplified Layout (diff) | |
| parent | Merge pull request #480 from a-kenji/dump-config-exit (diff) | |
| download | sl0ppij-85a4e476f2011dc0491a15bcce3b0052ebb15adb.tar.gz sl0ppij-85a4e476f2011dc0491a15bcce3b0052ebb15adb.tar.xz sl0ppij-85a4e476f2011dc0491a15bcce3b0052ebb15adb.zip | |
fixup! Merge branch 'main' of https://github.com/zellij-org/zellij into simple-font-ui
Diffstat (limited to 'src/common/input')
| -rw-r--r-- | src/common/input/actions.rs | 3 | ||||
| -rw-r--r-- | src/common/input/handler.rs | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/common/input/actions.rs b/src/common/input/actions.rs index 54cbbcdc..b806aa3f 100644 --- a/src/common/input/actions.rs +++ b/src/common/input/actions.rs @@ -29,6 +29,9 @@ pub enum Action { /// Move the focus pane in specified direction. SwitchFocus, MoveFocus(Direction), + /// Tries to move the focus pane in specified direction. + /// If there is no pane in the direction, move to previous/next Tab. + MoveFocusOrTab(Direction), /// Scroll up in focus pane. ScrollUp, /// Scroll down in focus pane. diff --git a/src/common/input/handler.rs b/src/common/input/handler.rs index 6238a3ee..68a75448 100644 --- a/src/common/input/handler.rs +++ b/src/common/input/handler.rs @@ -4,7 +4,7 @@ use super::actions::Action; use super::keybinds::Keybinds; use crate::client::ClientInstruction; use crate::common::input::config::Config; -use crate::common::{SenderWithContext, OPENCALLS}; +use crate::common::thread_bus::{SenderWithContext, OPENCALLS}; use crate::errors::ContextType; use crate::os_input_output::ClientOsApi; use crate::server::ServerInstruction; @@ -119,7 +119,8 @@ impl InputHandler { | Action::GoToNextTab | Action::GoToPreviousTab | Action::CloseTab - | Action::GoToTab(_) => { + | Action::GoToTab(_) + | Action::MoveFocusOrTab(_) => { self.command_is_executing.blocking_input_thread(); self.os_input .send_to_server(ServerInstruction::Action(action)); |
