Skip to content

Commit

Permalink
Merge pull request #1122 from tig/fix_949_mac_glyphs
Browse files Browse the repository at this point in the history
made LC_ALL OS dependent. Fixes #949
  • Loading branch information
tig authored Mar 8, 2021
2 parents fde741a + e889bbb commit 682c934
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions Terminal.Gui/ConsoleDrivers/CursesDriver/constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public enum Event : long {
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
Expand Down Expand Up @@ -165,8 +165,16 @@ public enum Event : long {
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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/Terminal.Gui.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0;net5.0</TargetFrameworks>
<RootNamespace>Terminal.Gui</RootNamespace>
Expand Down

0 comments on commit 682c934

Please sign in to comment.