refactored internal Init() (now called InternnalInit()) to be more clear; updated docs and unit tests

This commit is contained in:
Charlie Kindel
2022-11-05 14:36:41 -06:00
parent b6dceb3048
commit de3c02e9bf
5 changed files with 132 additions and 60 deletions

View File

@@ -1451,16 +1451,20 @@ namespace Terminal.Gui {
{
TerminalResized = terminalResized;
var winSize = WinConsole.GetConsoleOutputWindow (out Point pos);
cols = winSize.Width;
rows = winSize.Height;
try {
var winSize = WinConsole.GetConsoleOutputWindow (out Point pos);
cols = winSize.Width;
rows = winSize.Height;
WindowsConsole.SmallRect.MakeEmpty (ref damageRegion);
WindowsConsole.SmallRect.MakeEmpty (ref damageRegion);
ResizeScreen ();
UpdateOffScreen ();
ResizeScreen ();
UpdateOffScreen ();
CreateColors ();
CreateColors ();
} catch (Win32Exception e) {
throw new InvalidOperationException ("The Windows Console output window is not available.", e);
}
}
public override void ResizeScreen ()