ソースを参照

Fixed readonly issue

Tig 1 年間 前
コミット
23394c10a2
1 ファイル変更6 行追加1 行削除
  1. 6 1
      Terminal.Gui/Views/TextView.cs

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

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