brain: Navigate hunks with j and k

72b40ee0c06fc7bdbbf86559302e634e029bdf50
Reserve the directional list keys for hunk navigation in the commit view.

Assisted-by: Codex:gpt-5.6-sol
Alexis Sellier committed ago 1 parent 8e126a35
crates/brain/src/session.rs +3 -2
327 327
            Event::Key(Key::Char('v')) => {
328 328
                self.visibility.show_accepted = !self.visibility.show_accepted;
329 329
                self.refresh_visibility()?;
330 330
                Ok(Control::Redraw)
331 331
            }
332 -
            Event::Key(Key::Char('n')) => self.apply(DiffAction::NextHunk, area),
333 -
            Event::Key(Key::Char('p')) => self.apply(DiffAction::PreviousHunk, area),
332 +
            Event::Key(Key::Char('j')) => self.apply(DiffAction::NextHunk, area),
333 +
            Event::Key(Key::Char('k')) => self.apply(DiffAction::PreviousHunk, area),
334 +
            Event::Key(Key::Char('n' | 'p')) => Ok(Control::Continue),
334 335
            Event::Key(Key::Char('c')) => {
335 336
                self.enter_hunk_view(area)?;
336 337
                Ok(Control::Redraw)
337 338
            }
338 339
            Event::Key(Key::Enter) => {
crates/brain/src/session/status.rs +1 -1
76 76
    ("q", "quit"),
77 77
];
78 78
/// Action hints shown in commit diff mode.
79 79
const COMMIT_ACTIONS: &[(&str, &str)] = &[
80 80
    (TAB_KEY, "history"),
81 -
    ("n/p", "hunk"),
81 +
    ("j/k", "hunk"),
82 82
    ("a", "accept hunk"),
83 83
    ("c", "comment"),
84 84
];
85 85
/// Action hints shown while browsing hunk comments.
86 86
const HUNK_BROWSE_ACTIONS: &[(&str, &str)] = &[