Skip to content

Commit

Permalink
chore(tui): move h bind to correct section (#9543)
Browse files Browse the repository at this point in the history
### Description

I hadn't realized that the list was separated such that the fallthrough
binds were at the end of the list. Putting `h` at the bottom so its in
the right spot now.

### Testing Instructions

👀
  • Loading branch information
anthonyshew authored Nov 29, 2024
1 parent 02f8656 commit bd3fcf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/turborepo-ui/src/tui/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ fn translate_key_event(options: InputOptions, key_event: KeyEvent) -> Option<Eve
restore_scroll: true,
})
}
KeyCode::Char('h') => Some(Event::ToggleSidebar),
KeyCode::Enter if matches!(options.focus, LayoutSections::Search { .. }) => {
Some(Event::SearchExit {
restore_scroll: false,
Expand All @@ -108,6 +107,7 @@ fn translate_key_event(options: InputOptions, key_event: KeyEvent) -> Option<Eve
Some(Event::SearchEnterChar(c))
}
// Fall through if we aren't in interactive mode
KeyCode::Char('h') => Some(Event::ToggleSidebar),
KeyCode::Char('p') if key_event.modifiers == KeyModifiers::CONTROL => Some(Event::ScrollUp),
KeyCode::Char('n') if key_event.modifiers == KeyModifiers::CONTROL => {
Some(Event::ScrollDown)
Expand Down

0 comments on commit bd3fcf1

Please sign in to comment.