Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Terminal.Gui/Core/View.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ public virtual void Redraw (Rect bounds)
};
view.OnDrawContent (rect);
view.Redraw (rect);
view.OnDrawContentComplete (rect);
}
}
view.NeedDisplay = Rect.Empty;
Expand Down
18 changes: 18 additions & 0 deletions UnitTests/ViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3892,5 +3892,23 @@ This is a tes
This is a tes
", output);
}

[Fact, AutoInitShutdown]
public void DrawContentComplete_Event_Is_Always_Called ()
{
var viewCalled = false;
var tvCalled = false;

var view = new View ("View") { Width = 10, Height = 10 };
view.DrawContentComplete += (e) => viewCalled = true;
var tv = new TextView () { Y = 11, Width = 10, Height = 10 };
tv.DrawContentComplete += (e) => tvCalled = true;

Application.Top.Add (view, tv);
Application.Begin (Application.Top);

Assert.True (viewCalled);
Assert.True (tvCalled);
}
}
}