Browse Source

Fixed PositionCursor IsInitialized

Tig 1 year ago
parent
commit
2a00435c54
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/View/ViewSubViews.cs

+ 1 - 1
Terminal.Gui/View/ViewSubViews.cs

@@ -870,7 +870,7 @@ public partial class View
     /// <returns>Viewport-relative cursor position. Return <see langword="null"/> to ensure the cursor is not visible.</returns>
     /// <returns>Viewport-relative cursor position. Return <see langword="null"/> to ensure the cursor is not visible.</returns>
     public virtual Point? PositionCursor ()
     public virtual Point? PositionCursor ()
     {
     {
-        if (CanFocus && HasFocus && ContentSize.HasValue)
+        if (IsInitialized && CanFocus && HasFocus && ContentSize.HasValue)
         {
         {
             // Base class will position the cursor at the end of the text.
             // Base class will position the cursor at the end of the text.
             Point location = Viewport.Location;
             Point location = Viewport.Location;