diff options
| author | mo8it <mo8it@proton.me> | 2024-04-30 01:41:08 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-30 01:41:08 +0200 |
| commit | 52c0f5b39efd7c71e63a3a680a1d91f3efc8eda5 (patch) | |
| tree | ef6ab11cbf11aa2cebb4b43e73d59f93ec3d241d /src/watch/state.rs | |
| parent | fef66b80ad0b90d7bbc6ebe704f34816a4b3173a (diff) | |
Fix clearing the terminal
Diffstat (limited to 'src/watch/state.rs')
| -rw-r--r-- | src/watch/state.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/watch/state.rs b/src/watch/state.rs index e5364c3..2cf7521 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -1,13 +1,13 @@ use anyhow::Result; use crossterm::{ style::{style, Stylize}, - terminal::{size, Clear, ClearType}, - ExecutableCommand, + terminal::size, }; use std::io::{self, StdoutLock, Write}; use crate::{ app_state::{AppState, ExercisesProgress}, + clear_terminal, exercise::OUTPUT_CAPACITY, progress_bar::progress_bar, terminal_link::TerminalFileLink, @@ -111,7 +111,7 @@ impl<'a> WatchState<'a> { // Prevent having the first line shifted. self.writer.write_all(b"\n")?; - self.writer.execute(Clear(ClearType::All))?; + clear_terminal(&mut self.writer)?; self.writer.write_all(&self.output)?; self.writer.write_all(b"\n")?; |
