浏览代码

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>
     /// <returns><see langword="true"/> if a view positioned the cursor and the position is visible.</returns>
     internal static bool PositionCursor (View view)
     internal static bool PositionCursor (View view)
     {
     {
-        if (view is null)
-        {
-            return false;
-        }
-
         // Find the most focused view and position the cursor there.
         // Find the most focused view and position the cursor there.
-        View mostFocused = view.MostFocused;
+        View mostFocused = view?.MostFocused;
 
 
         if (mostFocused is null)
         if (mostFocused is null)
         {
         {