clear terminal after switching to alternate screen

when using helix over mosh, the screen doesn't get cleared and
characters get left all over the place until they are overwritten. with
this change, the screen gets properly cleared as soon as helix starts
pull/1955/head
Rose Hudson 2022-04-03 16:02:32 +01:00 committed by Blaž Hrastnik
parent 3fc4ea2938
commit f8c83f9885
1 changed files with 1 additions and 0 deletions

View File

@ -683,6 +683,7 @@ impl Application {
terminal::enable_raw_mode()?;
let mut stdout = stdout();
execute!(stdout, terminal::EnterAlternateScreen)?;
execute!(stdout, terminal::Clear(terminal::ClearType::All))?;
if self.config.load().editor.mouse {
execute!(stdout, EnableMouseCapture)?;
}