mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-05-15 09:48:45 +00:00
Merge pull request #2384 from senekor/senekor/kvvswrqlorup
Allow selecting next exercise with enter key
This commit is contained in:
commit
b06c843179
@ -83,7 +83,7 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
|
||||
}
|
||||
}
|
||||
KeyCode::Char('r') => list_state.reset_selected()?,
|
||||
KeyCode::Char('c') => {
|
||||
KeyCode::Char('c') | KeyCode::Enter => {
|
||||
if list_state.selected_to_current_exercise()? {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@ -237,7 +237,8 @@ impl<'a> ListState<'a> {
|
||||
if self.message.is_empty() {
|
||||
// Help footer message
|
||||
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)?;
|
||||
writer = MaxLenWriter::new(stdout, self.term_width as usize);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user