From 34a5dd7600999110224f1183e199d2ca3b406a10 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 01:19:12 +0000 Subject: [PATCH] Reset static Application properties in ResetStateStatic Co-authored-by: tig <585482+tig@users.noreply.github.com> --- Terminal.Gui/App/ApplicationImpl.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Terminal.Gui/App/ApplicationImpl.cs b/Terminal.Gui/App/ApplicationImpl.cs index 7c6b237df..f160c50cc 100644 --- a/Terminal.Gui/App/ApplicationImpl.cs +++ b/Terminal.Gui/App/ApplicationImpl.cs @@ -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 (); }