diff options
| author | mo8it <mo8it@proton.me> | 2024-09-26 18:15:45 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-09-26 18:15:45 +0200 |
| commit | 0c79f2ea3e1fd2db54ebe8fba8ed17369a15b365 (patch) | |
| tree | 956466c44ebfb177ec9e0178e420ae9b2c82d464 /src/watch.rs | |
| parent | 0e9eb9e87e21b1f95d2fbd8ad24ba8a197172318 (diff) | |
Reset in prompt with confirmation
Diffstat (limited to 'src/watch.rs')
| -rw-r--r-- | src/watch.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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)?; } |
