File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ public sealed class AppShell(
3535 public override void Render ( )
3636 {
3737 Console . Clear ( ) ;
38+
3839 int width = Console . WindowWidth ;
40+ int height = Console . WindowHeight ;
3941 ColorScheme colors = ActiveTheme . Colors ;
4042
4143 string headerText = ConsoleHelper . PadCenter ( $ " { Title . ToUpperInvariant ( ) } ", width - 2 ) ;
@@ -46,11 +48,9 @@ public override void Render()
4648
4749 int contentEndLine = Console . CursorTop ;
4850
49- int footerLine = Console . WindowHeight - 3 ;
50- if ( contentEndLine < footerLine )
51- {
52- ConsoleHelper . WriteEmptyLines ( footerLine - contentEndLine ) ;
53- }
51+ int footerLine = Math . Max ( contentEndLine + 1 , height - 4 ) ;
52+
53+ Console . SetCursorPosition ( 0 , footerLine ) ;
5454
5555 string footerL = LeftFooter ?? string . Empty ;
5656 string footerR = RightFooter ?? string . Empty ;
@@ -60,5 +60,6 @@ public override void Render()
6060 new Panel ( title : null , content : new ConsoleText ( footerText , colors . Muted ) ) . Render ( ) ;
6161
6262 Console . SetCursorPosition ( 0 , contentEndLine ) ;
63+ Console . WriteLine ( ) ;
6364 }
6465}
You can’t perform that action at this time.
0 commit comments