aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src
diff options
context:
space:
mode:
authorSagittarius-a <sagittarius-a@users.noreply.github.com>2021-07-21 23:43:20 +0200
committerSagittarius-a <sagittarius-a@users.noreply.github.com>2021-08-03 21:11:50 +0200
commit5799ea4e5d9456061455244d30da98b899f20b0d (patch)
tree6a287c092614fbcb2eda3b75a76eeecf9646a3a0 /zellij-utils/src
parentdocs(changelog): Fix update plugins #621 (diff)
downloadsl0ppij-5799ea4e5d9456061455244d30da98b899f20b0d.tar.gz
sl0ppij-5799ea4e5d9456061455244d30da98b899f20b0d.tar.xz
sl0ppij-5799ea4e5d9456061455244d30da98b899f20b0d.zip
feat(tab): add keybind to go to last tab visited
Fixes #398. Tab key is used as default for the `GoToLastTab` action.
Diffstat (limited to 'zellij-utils/src')
-rw-r--r--zellij-utils/src/errors.rs1
-rw-r--r--zellij-utils/src/input/actions.rs1
-rw-r--r--zellij-utils/src/input/mod.rs1
3 files changed, 3 insertions, 0 deletions
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs
index 6a053038..e215a500 100644
--- a/zellij-utils/src/errors.rs
+++ b/zellij-utils/src/errors.rs
@@ -227,6 +227,7 @@ pub enum ScreenContext {
MouseRelease,
MouseHold,
Copy,
+ GoToLastTab,
}
/// Stack call representations corresponding to the different types of [`PtyInstruction`]s.
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs
index 431a09bf..977c1a48 100644
--- a/zellij-utils/src/input/actions.rs
+++ b/zellij-utils/src/input/actions.rs
@@ -74,6 +74,7 @@ pub enum Action {
/// Close the current tab.
CloseTab,
GoToTab(u32),
+ GoToLastTab,
TabNameInput(Vec<u8>),
/// Run speficied command in new pane.
Run(RunCommandAction),
diff --git a/zellij-utils/src/input/mod.rs b/zellij-utils/src/input/mod.rs
index 746d5861..8601a63e 100644
--- a/zellij-utils/src/input/mod.rs
+++ b/zellij-utils/src/input/mod.rs
@@ -37,6 +37,7 @@ pub fn get_mode_info(
("x".to_string(), "Close".to_string()),
("r".to_string(), "Rename".to_string()),
("s".to_string(), "Sync".to_string()),
+ ("Tab".to_string(), "Last".to_string()),
],
InputMode::Scroll => vec![
("↓↑".to_string(), "Scroll".to_string()),