diff options
| author | Kunal Mohan <44079328+kunalmohan@users.noreply.github.com> | 2021-05-10 20:44:05 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-10 20:44:05 +0530 |
| commit | 74526a936a8020f11ba3d7ba41b3e6c0a77b2366 (patch) | |
| tree | 57d6b622fc9060d4d0d34d782a192cbfe7b70b12 /src/common/input | |
| parent | improve bug report template (#466) (diff) | |
| parent | After rebase (diff) | |
| download | sl0ppij-74526a936a8020f11ba3d7ba41b3e6c0a77b2366.tar.gz sl0ppij-74526a936a8020f11ba3d7ba41b3e6c0a77b2366.tar.xz sl0ppij-74526a936a8020f11ba3d7ba41b3e6c0a77b2366.zip | |
Merge pull request #471 from dantepippi/switch-tabs-464
Switching Tabs if there's no pane in the direction
Diffstat (limited to 'src/common/input')
| -rw-r--r-- | src/common/input/actions.rs | 3 | ||||
| -rw-r--r-- | src/common/input/handler.rs | 3 |
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)); |
