Parcourir la source

made LC_ALL OS dependent. Fixes #949

Charlie Kindel il y a 4 ans
Parent
commit
3f77d6d107

+ 11 - 3
Terminal.Gui/ConsoleDrivers/CursesDriver/constants.cs

@@ -89,7 +89,7 @@ namespace Unix.Terminal {
 		public const int DownEnd = unchecked((int)0x6);
 		public const int Home = unchecked((int)0x7);
 #else
-		public const int LeftRightUpNPagePPage= unchecked((int)0x0);
+		public const int LeftRightUpNPagePPage = unchecked((int)0x0);
 		public const int DownEnd = unchecked((int)0x0);
 		public const int Home = unchecked((int)0x0);
 #endif
@@ -165,8 +165,16 @@ namespace Unix.Terminal {
 		public const int AltCtrlKeyPPage = unchecked((int)0x22d + LeftRightUpNPagePPage);
 		public const int AltCtrlKeyHome = unchecked((int)0x219 + Home);
 		public const int AltCtrlKeyEnd = unchecked((int)0x214 + DownEnd);
-		public const int LC_ALL = 6;
-		static public int ColorPair(int n){
+
+		// see #949
+		static public int LC_ALL { get; private set; }
+		static Curses ()
+		{
+			LC_ALL = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (System.Runtime.InteropServices.OSPlatform.OSX) ? 0 : 6;
+		}
+
+		static public int ColorPair (int n)
+		{
 			return 0 + n * 256;
 		}
 	}

+ 4 - 0
Terminal.Gui/Terminal.Gui.csproj

@@ -22,6 +22,10 @@
     <Summary>Application framework for creating modern console applications using .NET</Summary>
     <Title>Terminal.Gui is a framework for creating console user interfaces</Title>
     <PackageReleaseNotes>
+      v1.0.0-pre.9
+      * NEW CONTROL: TreeView - Thanks @tznind!
+      * Fixes #1066. View sizing across the various terminals has been fixed; works in Windows Terminal again - thanks @bdisp
+
       v1.0.0-pre.8
       * NOTE: Windows Terminal is broken - see #1099
       * NEW CONTROL: TableView - Thanks @tznind!