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