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
This commit is contained in:
Rose Hudson 2022-04-03 16:02:32 +01:00 committed by Blaž Hrastnik
parent 3fc4ea2938
commit f8c83f9885

View File

@ -683,6 +683,7 @@ async fn claim_term(&mut self) -> Result<(), Error> {
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)?;
}