Tig преди 1 година
родител
ревизия
db65bf91fd
променени са 1 файла, в които са добавени 1 реда и са изтрити 6 реда
  1. 1 6
      Terminal.Gui/Application.cs

+ 1 - 6
Terminal.Gui/Application.cs

@@ -571,13 +571,8 @@ public static partial class Application
     /// <returns><see langword="true"/> if a view positioned the cursor and the position is visible.</returns>
     internal static bool PositionCursor (View view)
     {
-        if (view is null)
-        {
-            return false;
-        }
-
         // Find the most focused view and position the cursor there.
-        View mostFocused = view.MostFocused;
+        View mostFocused = view?.MostFocused;
 
         if (mostFocused is null)
         {