Bläddra i källkod

TextView now works properly

Tig 1 år sedan
förälder
incheckning
15fa1abab1
2 ändrade filer med 77 tillägg och 419 borttagningar
  1. 3 1
      Terminal.Gui/Views/TextView.cs
  2. 74 418
      UnitTests/Views/TextViewTests.cs

+ 3 - 1
Terminal.Gui/Views/TextView.cs

@@ -6069,7 +6069,9 @@ public class TextView : View
 
         if (!AllowsReturn || _isReadOnly)
         {
-            return OnAccept ();
+            // By Default pressing ENTER should be ignored (OnAccept will return false or null). Only cancel if the
+            // event was fired and set Cancel = true.
+            return OnAccept () == false;
         }
 
         SetWrapModel ();

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 74 - 418
UnitTests/Views/TextViewTests.cs


Vissa filer visades inte eftersom för många filer har ändrats