aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/input
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-05-10 17:24:19 +0200
committerGitHub <noreply@github.com>2021-05-10 17:24:19 +0200
commite2514b411cf168aa970a558c66ee0cb937c0a30c (patch)
tree2dbf111fd1dcdc62d91c3c2eba0b38fa02b9ba39 /src/common/input
parentFix exit code on `dump-default-config` (diff)
parentdocs(changelog): Switch tabs in normal mode #471 (diff)
downloadsl0ppij-e2514b411cf168aa970a558c66ee0cb937c0a30c.tar.gz
sl0ppij-e2514b411cf168aa970a558c66ee0cb937c0a30c.tar.xz
sl0ppij-e2514b411cf168aa970a558c66ee0cb937c0a30c.zip
Merge branch 'main' into dump-config-exit
Diffstat (limited to 'src/common/input')
-rw-r--r--src/common/input/actions.rs3
-rw-r--r--src/common/input/handler.rs3
2 files changed, 5 insertions, 1 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 78635237..aa204850 100644
--- a/src/common/input/handler.rs
+++ b/src/common/input/handler.rs
@@ -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));