diff options
Diffstat (limited to 'src/terminal.rs')
| -rw-r--r-- | src/terminal.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/terminal.rs b/src/terminal.rs index d6cfc69..c46a4a2 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -74,7 +74,13 @@ impl Terminal { } pub async fn init_full_screen(&mut self) -> Result<()> { + /* Theoretically, xterm clears the alternate screen buffer when switching + * into it. Konsole does not necessarily do so, so we add an explicit + * clear. This is only noticeable when we fail to exit cleanly and return + * to the shell while still in the alternate screen buffer. + */ self.start_alternate_screen().await?; + self.clear().await?; self.set_cursor_position(0, 0).await?; let (width, height) = self.report_size().await?; |