From 3f77d6d1077c1a28113a8ae113bbcd7131ada7a5 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Mon, 8 Mar 2021 09:36:22 -0700 Subject: [PATCH 1/2] made LC_ALL OS dependent. Fixes #949 --- .../ConsoleDrivers/CursesDriver/constants.cs | 14 +++++++++++--- Terminal.Gui/Terminal.Gui.csproj | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/ConsoleDrivers/CursesDriver/constants.cs b/Terminal.Gui/ConsoleDrivers/CursesDriver/constants.cs index e32c54775..8b964ddeb 100644 --- a/Terminal.Gui/ConsoleDrivers/CursesDriver/constants.cs +++ b/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; } } diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index 32442e246..9ef8f9e99 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -22,6 +22,10 @@ Application framework for creating modern console applications using .NET Terminal.Gui is a framework for creating console user interfaces + 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! From e889bbb1316b065c3008cad4c1c34f94c1cf25ed Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Mon, 8 Mar 2021 09:56:00 -0700 Subject: [PATCH 2/2] back out relnote change --- Terminal.Gui/Terminal.Gui.csproj | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index 9ef8f9e99..05c796ab1 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -1,4 +1,4 @@ - + net472;netstandard2.0;net5.0 Terminal.Gui @@ -22,10 +22,6 @@ Application framework for creating modern console applications using .NET Terminal.Gui is a framework for creating console user interfaces - 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!