File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -652,10 +652,14 @@ impl<'a> TermThemeRenderer<'a> {
652
652
self . term
653
653
}
654
654
655
+ /// Enlarge the theme by one line: allow displaying one more line of input.
655
656
pub fn add_line ( & mut self ) {
656
657
self . height += 1 ;
657
658
}
658
659
660
+ /// Write a formatted string to this terminal. The string can be span multiple lines.
661
+ ///
662
+ /// `F` is a closure prescribing the text to write into the current instance.
659
663
fn write_formatted_str <
660
664
F : FnOnce ( & mut TermThemeRenderer , & mut dyn fmt:: Write ) -> fmt:: Result ,
661
665
> (
@@ -668,6 +672,7 @@ impl<'a> TermThemeRenderer<'a> {
668
672
self . term . write_str ( & buf)
669
673
}
670
674
675
+ /// Like [`write_formatted_string`](#method::write_formatted_string), but add a linebreak afterwards.
671
676
fn write_formatted_line <
672
677
F : FnOnce ( & mut TermThemeRenderer , & mut dyn fmt:: Write ) -> fmt:: Result ,
673
678
> (
@@ -680,6 +685,9 @@ impl<'a> TermThemeRenderer<'a> {
680
685
self . term . write_line ( & buf)
681
686
}
682
687
688
+ /// Write a formatted prompt string to this terminal.
689
+ ///
690
+ /// `F` is a closure prescribing the text to write into the current instance.
683
691
fn write_formatted_prompt <
684
692
F : FnOnce ( & mut TermThemeRenderer , & mut dyn fmt:: Write ) -> fmt:: Result ,
685
693
> (
You can’t perform that action at this time.
0 commit comments