File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public Size Size
1414 get => new Size ( Console . WindowWidth , Console . WindowHeight ) ;
1515 set
1616 {
17- Console . SetCursorPosition ( 0 , 0 ) ;
17+ SafeConsole . SetCursorPosition ( 0 , 0 ) ;
1818 SafeConsole . SetWindowPosition ( 0 , 0 ) ;
1919 if ( ! ( Size <= value ) ) SafeConsole . SetWindowSize ( 1 , 1 ) ;
2020 SafeConsole . SetBufferSize ( value . Width , value . Height ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ namespace ConsoleGUI.Utils
66{
77 internal static class SafeConsole
88 {
9+ public static void SetCursorPosition ( int left , int top )
10+ {
11+ try
12+ {
13+ Console . SetCursorPosition ( left , top ) ;
14+ }
15+ catch ( Exception )
16+ { }
17+ }
18+
919 public static void SetWindowPosition ( int left , int top )
1020 {
1121 try
You can’t perform that action at this time.
0 commit comments