Skip to content

Commit

Permalink
removed tab_toggle_reverse_windows
Browse files Browse the repository at this point in the history
changed tab_toggle_reverse to include the SHIFT modifier, as crossterm
now (i.e. since crossterm-rs/crossterm#490)
sends SHIFT modifier for linux, too.
  • Loading branch information
nils-a committed Nov 13, 2020
1 parent 2f3af71 commit 9086daa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions assets/vim_style_key_config.ron
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
tab_stashes: ( code: Char('4'), modifiers: ( bits: 0,),),

tab_toggle: ( code: Tab, modifiers: ( bits: 0,),),
tab_toggle_reverse: ( code: BackTab, modifiers: ( bits: 0,),),
tab_toggle_reverse_windows: ( code: BackTab, modifiers: ( bits: 1,),),
tab_toggle_reverse: ( code: BackTab, modifiers: ( bits: 1,),),

focus_workdir: ( code: Char('w'), modifiers: ( bits: 0,),),
focus_stage: ( code: Char('s'), modifiers: ( bits: 0,),),
Expand Down
4 changes: 1 addition & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ impl App {
let new_flags = if k == self.key_config.tab_toggle {
self.toggle_tabs(false)?;
NeedsUpdate::COMMANDS
} else if k == self.key_config.tab_toggle_reverse
|| k == self.key_config.tab_toggle_reverse_windows
{
} else if k == self.key_config.tab_toggle_reverse {
self.toggle_tabs(true)?;
NeedsUpdate::COMMANDS
} else if k == self.key_config.tab_status
Expand Down
4 changes: 1 addition & 3 deletions src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub struct KeyConfig {
pub tab_stashes: KeyEvent,
pub tab_toggle: KeyEvent,
pub tab_toggle_reverse: KeyEvent,
pub tab_toggle_reverse_windows: KeyEvent,
pub focus_workdir: KeyEvent,
pub focus_stage: KeyEvent,
pub focus_right: KeyEvent,
Expand Down Expand Up @@ -76,8 +75,7 @@ impl Default for KeyConfig {
tab_stashing: KeyEvent { code: KeyCode::Char('3'), modifiers: KeyModifiers::empty()},
tab_stashes: KeyEvent { code: KeyCode::Char('4'), modifiers: KeyModifiers::empty()},
tab_toggle: KeyEvent { code: KeyCode::Tab, modifiers: KeyModifiers::empty()},
tab_toggle_reverse: KeyEvent { code: KeyCode::BackTab, modifiers: KeyModifiers::empty()},
tab_toggle_reverse_windows: KeyEvent { code: KeyCode::BackTab, modifiers: KeyModifiers::SHIFT},
tab_toggle_reverse: KeyEvent { code: KeyCode::BackTab, modifiers: KeyModifiers::SHIFT},
focus_workdir: KeyEvent { code: KeyCode::Char('w'), modifiers: KeyModifiers::empty()},
focus_stage: KeyEvent { code: KeyCode::Char('s'), modifiers: KeyModifiers::empty()},
focus_right: KeyEvent { code: KeyCode::Right, modifiers: KeyModifiers::empty()},
Expand Down

0 comments on commit 9086daa

Please sign in to comment.