Fix clearing the terminal

This commit is contained in:
mo8it
2024-04-30 01:41:08 +02:00
parent fef66b80ad
commit 52c0f5b39e
3 changed files with 13 additions and 16 deletions
+3 -6
View File
@@ -1,9 +1,5 @@
use anyhow::{bail, Context, Result};
use crossterm::{
style::Stylize,
terminal::{Clear, ClearType},
ExecutableCommand,
};
use crossterm::style::Stylize;
use serde::Deserialize;
use std::{
fs::{self, File},
@@ -13,6 +9,7 @@ use std::{
};
use crate::{
clear_terminal,
embedded::EMBEDDED_FILES,
exercise::{Exercise, OUTPUT_CAPACITY},
info_file::ExerciseInfo,
@@ -387,7 +384,7 @@ impl AppState {
writeln!(writer, "{}", "ok".green())?;
}
writer.execute(Clear(ClearType::All))?;
clear_terminal(writer)?;
writer.write_all(FENISH_LINE.as_bytes())?;
let final_message = self.final_message.trim();