summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-11-11 14:55:58 +0100
committermo8it <mo8it@proton.me>2024-11-11 14:55:58 +0100
commiteff2ce8a23bcd8f979dff917bcdb83dccbaa4170 (patch)
tree6a70f2717513a737bb5a68ce77588970b09d56e2
parentfd33c29b262e249de720dc8b04e878cd92a83d13 (diff)
Ignore input while checking all exercises in watch mode
-rw-r--r--src/watch/state.rs3
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 {