Skip to content

Commit

Permalink
Ignore input while checking all exercises in watch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mo8it committed Nov 11, 2024
1 parent fd33c29 commit eff2ce8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/watch/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit eff2ce8

Please sign in to comment.