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 {
626626pub ( crate ) struct TermThemeRenderer < ' a > {
627627 term : & ' a Term ,
628628 theme : & ' a dyn Theme ,
629+ /// Number of lines of input in the current theme.
629630 height : usize ,
631+ /// Height of the current prompt string in the current theme.
630632 prompt_height : usize ,
633+ /// TODO what's this?
631634 prompts_reset_height : bool ,
632635}
633636
@@ -850,13 +853,17 @@ impl<'a> TermThemeRenderer<'a> {
850853 } )
851854 }
852855
856+ /// Clear the current theme.
857+ ///
858+ /// Position the cursor at the beginning of the current line.
853859 pub fn clear ( & mut self ) -> io:: Result < ( ) > {
854860 self . term
855861 . clear_last_lines ( self . height + self . prompt_height ) ?;
856862 self . height = 0 ;
857863 Ok ( ( ) )
858864 }
859865
866+ /// Clear the current theme no idea about prompt!
860867 pub fn clear_preserve_prompt ( & mut self , size_vec : & [ usize ] ) -> io:: Result < ( ) > {
861868 let mut new_height = self . height ;
862869 // Check each item size, increment on finding an overflow
You can’t perform that action at this time.
0 commit comments