فهرست منبع

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


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است