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 @@ -626,8 +626,11 @@ impl Theme for ColorfulTheme {
626
626
pub ( crate ) struct TermThemeRenderer < ' a > {
627
627
term : & ' a Term ,
628
628
theme : & ' a dyn Theme ,
629
+ /// Number of lines of input in the current theme.
629
630
height : usize ,
631
+ /// Height of the current prompt string in the current theme.
630
632
prompt_height : usize ,
633
+ /// TODO what's this?
631
634
prompts_reset_height : bool ,
632
635
}
633
636
@@ -850,13 +853,17 @@ impl<'a> TermThemeRenderer<'a> {
850
853
} )
851
854
}
852
855
856
+ /// Clear the current theme.
857
+ ///
858
+ /// Position the cursor at the beginning of the current line.
853
859
pub fn clear ( & mut self ) -> io:: Result < ( ) > {
854
860
self . term
855
861
. clear_last_lines ( self . height + self . prompt_height ) ?;
856
862
self . height = 0 ;
857
863
Ok ( ( ) )
858
864
}
859
865
866
+ /// Clear the current theme no idea about prompt!
860
867
pub fn clear_preserve_prompt ( & mut self , size_vec : & [ usize ] ) -> io:: Result < ( ) > {
861
868
let mut new_height = self . height ;
862
869
// Check each item size, increment on finding an overflow
You can’t perform that action at this time.
0 commit comments