Merge pull request #1122 from tig/fix_949_mac_glyphs

made LC_ALL OS dependent. Fixes #949
This commit is contained in:
Charlie Kindel
2021-03-08 10:03:45 -07:00
committed by GitHub
2 changed files with 12 additions and 4 deletions

View File

@@ -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;
}
}

View File

@@ -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>