Skip to content

Commit afe04c6

Browse files
committed
Tweak comments in TermThemeRenderer::clear().
1 parent 0e04cb9 commit afe04c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/theme.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,12 +843,12 @@ impl<'a> TermThemeRenderer<'a> {
843843
///
844844
/// Position the cursor at the beginning of the current line.
845845
pub fn clear(&mut self) -> io::Result<()> {
846-
// clear_last_lines only clears the lines preding the current one.
846+
// clear the current line first, so the cursor ends at the beginning of the current line.
847847
self.term.clear_line()?;
848848
self.term
849849
.clear_last_lines(self.height + self.prompt_height)?;
850-
// Technically, self.term now contains self.height + self.prompt_height empty lines after
851-
// the current line. As these are empty, we don't really care, though.
850+
// self.term now contains self.height + self.prompt_height empty lines after
851+
// the current line. That doesn't really matter, as these are empty.
852852
self.height = 0;
853853
Ok(())
854854
}

0 commit comments

Comments
 (0)