From 38ee8c99f35f6e9c0e894675dedecea1a90891d5 Mon Sep 17 00:00:00 2001 From: Mehran Kordi Date: Thu, 4 Jun 2020 18:22:35 +0200 Subject: [PATCH] fixed an issue with tab reverse on windows. (#110) closes #111 --- src/app.rs | 3 ++- src/keys.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 72edbb25..dba04de3 100644 --- a/src/app.rs +++ b/src/app.rs @@ -129,7 +129,8 @@ impl App { self.toggle_tabs(false)?; NeedsUpdate::COMMANDS } - keys::TAB_TOGGLE_REVERSE => { + keys::TAB_TOGGLE_REVERSE + | keys::TAB_TOGGLE_REVERSE_WINDOWS => { self.toggle_tabs(true)?; NeedsUpdate::COMMANDS } diff --git a/src/keys.rs b/src/keys.rs index ab18369c..7ba8aafc 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -20,6 +20,8 @@ pub const TAB_3: KeyEvent = no_mod(KeyCode::Char('3')); pub const TAB_4: KeyEvent = no_mod(KeyCode::Char('4')); pub const TAB_TOGGLE: KeyEvent = no_mod(KeyCode::Tab); pub const TAB_TOGGLE_REVERSE: KeyEvent = no_mod(KeyCode::BackTab); +pub const TAB_TOGGLE_REVERSE_WINDOWS: KeyEvent = + with_mod(KeyCode::BackTab, KeyModifiers::SHIFT); pub const FOCUS_WORKDIR: KeyEvent = no_mod(KeyCode::Char('w')); pub const FOCUS_STAGE: KeyEvent = no_mod(KeyCode::Char('s')); pub const FOCUS_RIGHT: KeyEvent = no_mod(KeyCode::Right);