瀏覽代碼

Code Cleanup

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)
         {