File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -843,11 +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- // 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.
846+ // clear_last_lines only clears the lines preding the current one.
848847 self . term . clear_line ( ) ?;
849848 self . term
850849 . 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.
851852 self . height = 0 ;
852853 Ok ( ( ) )
853854 }
You can’t perform that action at this time.
0 commit comments