aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/input
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-05-10 20:54:39 +0200
committera-kenji <aks.kenji@protonmail.com>2021-05-10 20:54:39 +0200
commit85a4e476f2011dc0491a15bcce3b0052ebb15adb (patch)
treeeb5d120250c5c3b0d74314a42129a857bf6b1afe /src/common/input
parentfixup! Add Option for Simplified Layout (diff)
parentMerge pull request #480 from a-kenji/dump-config-exit (diff)
downloadsl0ppij-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.rs3
-rw-r--r--src/common/input/handler.rs5
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));