Fixes #2076. Running alone the SetColors_Changes_Colors unit test will fail.

This commit is contained in:
BDisp
2022-10-09 17:36:59 +01:00
parent 8d9d96f5af
commit 15a7e37a50

View File

@@ -164,11 +164,13 @@ namespace Terminal.Gui {
//
// T:System.IO.IOException:
// An I/O error occurred.
static ConsoleColor _defaultBackgroundColor = ConsoleColor.Black;
/// <summary>
///
/// </summary>
public static ConsoleColor BackgroundColor { get; set; } = _defaultBackgroundColor;
static ConsoleColor _defaultBackgroundColor = ConsoleColor.Black;
//
// Summary:
@@ -187,11 +189,13 @@ namespace Terminal.Gui {
//
// T:System.IO.IOException:
// An I/O error occurred.
static ConsoleColor _defaultForegroundColor = ConsoleColor.Gray;
/// <summary>
///
/// </summary>
public static ConsoleColor ForegroundColor { get; set; } = _defaultForegroundColor;
static ConsoleColor _defaultForegroundColor = ConsoleColor.Gray;
//
// Summary:
// Gets or sets the height of the buffer area.
@@ -541,6 +545,9 @@ namespace Terminal.Gui {
// Exceptions:
// T:System.IO.IOException:
// An I/O error occurred.
static char [,] _buffer = new char [WindowWidth, WindowHeight];
/// <summary>
///
/// </summary>
@@ -550,8 +557,6 @@ namespace Terminal.Gui {
SetCursorPosition (0, 0);
}
static char [,] _buffer = new char [WindowWidth, WindowHeight];
//
// Summary:
// Copies a specified source area of the screen buffer to a specified destination
@@ -811,9 +816,9 @@ namespace Terminal.Gui {
public static ConsoleKeyInfo ReadKey (bool intercept)
{
if (MockKeyPresses.Count > 0) {
return MockKeyPresses.Pop();
return MockKeyPresses.Pop ();
} else {
return new ConsoleKeyInfo ('\0', (ConsoleKey)'\0', false,false,false);
return new ConsoleKeyInfo ('\0', (ConsoleKey)'\0', false, false, false);
}
}