File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -623,8 +623,11 @@ impl Theme for ColorfulTheme {
623
623
pub ( crate ) struct TermThemeRenderer < ' a > {
624
624
term : & ' a Term ,
625
625
theme : & ' a dyn Theme ,
626
+ /// Number of lines of input in the current theme.
626
627
height : usize ,
628
+ /// Height of the current prompt string in the current theme.
627
629
prompt_height : usize ,
630
+ /// TODO what's this?
628
631
prompts_reset_height : bool ,
629
632
}
630
633
@@ -839,13 +842,17 @@ impl<'a> TermThemeRenderer<'a> {
839
842
} )
840
843
}
841
844
845
+ /// Clear the current theme.
846
+ ///
847
+ /// Position the cursor at the beginning of the current line.
842
848
pub fn clear ( & mut self ) -> io:: Result < ( ) > {
843
849
self . term
844
850
. clear_last_lines ( self . height + self . prompt_height ) ?;
845
851
self . height = 0 ;
846
852
Ok ( ( ) )
847
853
}
848
854
855
+ /// Clear the current theme no idea about prompt!
849
856
pub fn clear_preserve_prompt ( & mut self , size_vec : & [ usize ] ) -> io:: Result < ( ) > {
850
857
let mut new_height = self . height ;
851
858
// Check each item size, increment on finding an overflow
You can’t perform that action at this time.
0 commit comments