Clear screen properly on start

This commit is contained in:
Dreaded_X 2025-04-16 16:41:15 +02:00
parent 88068f9971
commit fba5e5b813
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4

View File

@ -1,5 +1,5 @@
use crossterm::execute; use crossterm::execute;
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen}; use crossterm::terminal::{Clear, ClearType, EnterAlternateScreen, LeaveAlternateScreen};
use russh::ChannelId; use russh::ChannelId;
use russh::server::Handle; use russh::server::Handle;
use tokio::sync::mpsc::{UnboundedSender, unbounded_channel}; use tokio::sync::mpsc::{UnboundedSender, unbounded_channel};
@ -34,6 +34,7 @@ impl TerminalHandle {
}; };
execute!(terminal_handle, EnterAlternateScreen)?; execute!(terminal_handle, EnterAlternateScreen)?;
execute!(terminal_handle, Clear(ClearType::All))?;
Ok(terminal_handle) Ok(terminal_handle)
} }