ソースを参照

TextView now works properly

Tig 1 年間 前
コミット
15fa1abab1
2 ファイル変更77 行追加419 行削除
  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 ();

ファイルの差分が大きいため隠しています
+ 74 - 418
UnitTests/Views/TextViewTests.cs


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません