Browse Source

Fixes #2808. v2 ColorTests unit test is failing on Windows when testing the CursesDriver instance.

BDisp 2 years ago
parent
commit
e507df7b98
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

+ 4 - 0
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -666,6 +666,9 @@ internal class CursesDriver : ConsoleDriver {
 
 		TerminalResized = terminalResized;
 
+		if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
+			Clipboard = new FakeDriver.FakeClipboard ();
+		} else {
 		if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
 			Clipboard = new MacOSXClipboard ();
 		} else {
@@ -675,6 +678,7 @@ internal class CursesDriver : ConsoleDriver {
 				Clipboard = new CursesClipboard ();
 			}
 		}
+		}
 
 		ClearContents ();
 		StartReportingMouseMoves ();