Merge pull request #2384 from senekor/senekor/kvvswrqlorup

Allow selecting next exercise with enter key
This commit is contained in:
Mo Bitar 2026-04-25 14:04:11 +02:00 committed by GitHub
commit b06c843179
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -83,7 +83,7 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
} }
} }
KeyCode::Char('r') => list_state.reset_selected()?, KeyCode::Char('r') => list_state.reset_selected()?,
KeyCode::Char('c') => { KeyCode::Char('c') | KeyCode::Enter => {
if list_state.selected_to_current_exercise()? { if list_state.selected_to_current_exercise()? {
return Ok(()); return Ok(());
} }

View File

@ -237,7 +237,8 @@ impl<'a> ListState<'a> {
if self.message.is_empty() { if self.message.is_empty() {
// Help footer message // Help footer message
if self.scroll_state.selected().is_some() { if self.scroll_state.selected().is_some() {
writer.write_str("↓/j ↑/k home/g end/G | <c>ontinue at | <r>eset exercise")?; writer
.write_str("↓/j ↑/k home/g end/G | ↩️/<c>ontinue at | <r>eset exercise")?;
next_ln(stdout)?; next_ln(stdout)?;
writer = MaxLenWriter::new(stdout, self.term_width as usize); writer = MaxLenWriter::new(stdout, self.term_width as usize);