From 8de7c57c2358a00014d7030b157c87ee184fde1b Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 25 Jul 2024 14:54:40 +0200 Subject: [PATCH] GetCell fixes --- IDE/src/util/ConsoleProvider.bf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/IDE/src/util/ConsoleProvider.bf b/IDE/src/util/ConsoleProvider.bf index 9cb2719e..1ea4cf78 100644 --- a/IDE/src/util/ConsoleProvider.bf +++ b/IDE/src/util/ConsoleProvider.bf @@ -149,7 +149,9 @@ class WinNativeConsoleProvider : ConsoleProvider [CRepr] struct RECT : this(int16 left, int16 top, int16 right, int16 bottom) { + [Inline] public int16 Width => right - left; + [Inline] public int16 Height => bottom - top; } @@ -372,15 +374,12 @@ class WinNativeConsoleProvider : ConsoleProvider return (mScreenInfo.mInfo.mCursorX, mScreenInfo.mInfo.mCursorY); return default; } - - set - { - - } } public override Cell GetCell(int col, int row) { + if (mScreenInfo == null) + return default; if ((row < 0) || (row >= mScreenInfo.mInfo.mWindowRect.Height)) { GetFullScreenInfo(mScreenInfo);