File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -843,12 +843,12 @@ impl<'a> TermThemeRenderer<'a> {
843
843
///
844
844
/// Position the cursor at the beginning of the current line.
845
845
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 .
847
847
self . term . clear_line ( ) ?;
848
848
self . term
849
849
. 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 .
852
852
self . height = 0 ;
853
853
Ok ( ( ) )
854
854
}
You can’t perform that action at this time.
0 commit comments