Reset static Application properties in ResetStateStatic

Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-23 01:19:12 +00:00
parent f4a556cb52
commit 34a5dd7600

View File

@@ -120,6 +120,18 @@ public partial class ApplicationImpl : IApplication
// If an instance exists, reset it
_instance?.ResetState (ignoreDisposed);
// Reset Application static properties to their defaults
// This ensures tests start with clean state
Application.ForceDriver = string.Empty;
Application.Force16Colors = false;
Application.IsMouseDisabled = false;
Application.QuitKey = Key.Esc;
Application.ArrangeKey = Key.F5.WithCtrl;
Application.NextTabGroupKey = Key.F6;
Application.NextTabKey = Key.Tab;
Application.PrevTabGroupKey = Key.F6.WithShift;
Application.PrevTabKey = Key.Tab.WithShift;
// Always reset the model tracking to allow tests to use either model after reset
ResetModelUsageTracking ();
}