From 0c79f2ea3e1fd2db54ebe8fba8ed17369a15b365 Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 26 Sep 2024 18:15:45 +0200 Subject: Reset in prompt with confirmation --- src/watch.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/watch.rs') diff --git a/src/watch.rs b/src/watch.rs index 11450b4..35533b0 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -100,13 +100,14 @@ fn run_watch( ExercisesProgress::NewPending => watch_state.run_current_exercise(&mut stdout)?, ExercisesProgress::CurrentPending => (), }, + WatchEvent::Input(InputEvent::Run) => watch_state.run_current_exercise(&mut stdout)?, WatchEvent::Input(InputEvent::Hint) => watch_state.show_hint(&mut stdout)?, WatchEvent::Input(InputEvent::List) => return Ok(WatchExit::List), + WatchEvent::Input(InputEvent::Reset) => watch_state.reset_exercise(&mut stdout)?, WatchEvent::Input(InputEvent::Quit) => { stdout.write_all(QUIT_MSG)?; break; } - WatchEvent::Input(InputEvent::Run) => watch_state.run_current_exercise(&mut stdout)?, WatchEvent::FileChange { exercise_ind } => { watch_state.handle_file_change(exercise_ind, &mut stdout)?; } -- cgit v1.2.3