diff options
| author | mo8it <mo8it@proton.me> | 2024-11-11 14:55:58 +0100 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-11-11 14:55:58 +0100 |
| commit | eff2ce8a23bcd8f979dff917bcdb83dccbaa4170 (patch) | |
| tree | 6a70f2717513a737bb5a68ce77588970b09d56e2 /src/watch/state.rs | |
| parent | fd33c29b262e249de720dc8b04e878cd92a83d13 (diff) | |
Ignore input while checking all exercises in watch mode
Diffstat (limited to 'src/watch/state.rs')
| -rw-r--r-- | src/watch/state.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/watch/state.rs b/src/watch/state.rs index c27dedf..5263bc5 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -269,6 +269,9 @@ impl<'a> WatchState<'a> { } pub fn check_all_exercises(&mut self, stdout: &mut StdoutLock) -> Result<ExercisesProgress> { + // Ignore any input until checking all exercises is done. + let _input_pause_guard = InputPauseGuard::scoped_pause(); + if let Some(first_pending_exercise_ind) = self.app_state.check_all_exercises(stdout)? { // Only change exercise if the current one is done. if self.app_state.current_exercise().done { |
