Преглед изворни кода

Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop

Tig пре 5 месеци
родитељ
комит
0330cda9ed
4 измењених фајлова са 21 додато и 5 уклоњено
  1. 1 1
      GitVersion.yml
  2. 7 3
      README.md
  3. 1 1
      Terminal.Gui/Text/TextFormatter.cs
  4. 12 0
      UnitTests/Views/LabelTests.cs

+ 1 - 1
GitVersion.yml

@@ -19,7 +19,7 @@ branches:
 
 
   v1_develop:
   v1_develop:
     mode: ContinuousDeployment
     mode: ContinuousDeployment
-    tag: dev
+    tag: v1_develop
     regex: v1_develop
     regex: v1_develop
     source-branches:
     source-branches:
     - v1_release
     - v1_release

+ 7 - 3
README.md

@@ -28,6 +28,8 @@ cd myproj
 dotnet run
 dotnet run
 ```
 ```
 
 
+There is also a [visual designer](https://github.com/gui-cs/TerminalGuiDesigner) (uses Terminal.Gui itself).
+
 ## Documentation 
 ## Documentation 
 
 
 * [Getting Started](https://gui-cs.github.io/Terminal.GuiV2Docs/docs/getting-started.html)
 * [Getting Started](https://gui-cs.github.io/Terminal.GuiV2Docs/docs/getting-started.html)
@@ -47,14 +49,16 @@ The team is looking forward to seeing new amazing projects made by the community
 
 
 ## Sample Usage in C#
 ## Sample Usage in C#
 
 
-The following example shows a basic Terminal.Gui application in C#:
-
-[!code-csharp[](./Example/Example.cs)]
+The following example shows a basic Terminal.Gui application in C#:  
+[Example (source)](./Example/Example.cs)
 
 
 When run the application looks as follows:
 When run the application looks as follows:
 
 
 ![Simple Usage app](./docfx/images/Example.png)
 ![Simple Usage app](./docfx/images/Example.png)
 
 
+## Sample usage in F#  
+F# examples are located [here](./FSharpExample/Program.fs)
+
 ## Installing
 ## Installing
 
 
 Use NuGet to install the `Terminal.Gui` NuGet package: https://www.nuget.org/packages/Terminal.Gui
 Use NuGet to install the `Terminal.Gui` NuGet package: https://www.nuget.org/packages/Terminal.Gui

+ 1 - 1
Terminal.Gui/Text/TextFormatter.cs

@@ -2124,7 +2124,7 @@ public class TextFormatter
         var start = string.Empty;
         var start = string.Empty;
         var i = 0;
         var i = 0;
 
 
-        foreach (Rune c in text)
+        foreach (Rune c in text.EnumerateRunes ())
         {
         {
             if (c == hotKeySpecifier && i == hotPos)
             if (c == hotKeySpecifier && i == hotPos)
             {
             {

+ 12 - 0
UnitTests/Views/LabelTests.cs

@@ -1460,4 +1460,16 @@ e
         Application.Top.Dispose ();
         Application.Top.Dispose ();
         Application.ResetState ();
         Application.ResetState ();
     }
     }
+
+    // https://github.com/gui-cs/Terminal.Gui/issues/3893
+    [Fact]
+    [SetupFakeDriver]
+    public void TestLabelUnderscoreMinus ()
+    {
+        var lbl = new Label ()
+        {
+            Text = "TextView with some more test_- text. Unicode shouldn't 𝔹Aℝ𝔽!"
+        };
+        lbl.Draw ();
+    }
 }
 }