Skip to content

Commit

Permalink
make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoheiKamiya committed Jan 25, 2025
1 parent 9d8dcde commit 23d5bb2
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/usecase/tui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,22 @@ impl Model<'_> {
KeyCode::Tab => Some(Message::MoveToNextPane),
KeyCode::Esc => Some(Message::Quit),
_ => {
let is_ctrl_pressed = key.modifiers.contains(KeyModifiers::CONTROL);
match s.current_pane {
CurrentPane::Main => {
match (key.code, is_ctrl_pressed) {
let is_ctrl_pressed = key.modifiers.contains(KeyModifiers::CONTROL);
match s.current_pane {
CurrentPane::Main => match (key.code, is_ctrl_pressed) {
(KeyCode::Down, _) | (KeyCode::Char('n'), true) => Some(Message::NextCommand),
(KeyCode::Up, _) | (KeyCode::Char('p'), true) => Some(Message::PreviousCommand),
(KeyCode::Enter, _) => Some(Message::ExecuteCommand),
(_, _) => Some(Message::SearchTextAreaKeyInput(key)),
}
}
CurrentPane::History => {
match (key.code, is_ctrl_pressed) {
},
CurrentPane::History => match (key.code, is_ctrl_pressed) {
(KeyCode::Char('q'), _) => Some(Message::Quit),
(KeyCode::Down, _) | (KeyCode::Char('n'), true) => Some(Message::NextHistory),
(KeyCode::Up, _) | (KeyCode::Char('p'), true) => Some(Message::PreviousHistory),
(KeyCode::Enter, _) | (KeyCode::Char(' '), _) => Some(Message::ExecuteCommand),
_ => None,
}
}
}
},
}
}
},
_ => None,
Expand Down

0 comments on commit 23d5bb2

Please sign in to comment.