Explorar o código

Reset static Application properties in ResetStateStatic

Co-authored-by: tig <[email protected]>
copilot-swe-agent[bot] hai 3 semanas
pai
achega
34a5dd7600
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      Terminal.Gui/App/ApplicationImpl.cs

+ 12 - 0
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 ();
     }