We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29da763 commit 3f16c44Copy full SHA for 3f16c44
src/theme.rs
@@ -839,7 +839,13 @@ impl<'a> TermThemeRenderer<'a> {
839
})
840
}
841
842
+ /// Clear the current theme.
843
+ ///
844
+ /// Position the cursor at the beginning of the current line.
845
pub fn clear(&mut self) -> io::Result<()> {
846
+ // We must clear the current line first: `clear_last_lines` places the cursor on the first deleted line,
847
+ // whereas we want to have it on the current line.
848
+ self.term.clear_line()?;
849
self.term
850
.clear_last_lines(self.height + self.prompt_height)?;
851
self.height = 0;
0 commit comments