Skip to content

Commit

Permalink
Fixes the Clear method.
Browse files Browse the repository at this point in the history
  • Loading branch information
BDisp committed Feb 27, 2023
1 parent 301567b commit af29ceb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Terminal.Gui/Core/View.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,15 +1110,8 @@ public void BringSubviewForward (View subview)
/// </remarks>
public void Clear ()
{
Rect containerBounds = GetContainerBounds ();
Rect viewBounds = Bounds;
if (!containerBounds.IsEmpty) {
viewBounds.Width = Math.Min (viewBounds.Width, containerBounds.Width);
viewBounds.Height = Math.Min (viewBounds.Height, containerBounds.Height);
}

var h = viewBounds.Height;
var w = viewBounds.Width;
var h = Frame.Height;
var w = Frame.Width;
for (var line = 0; line < h; line++) {
Move (0, line);
for (var col = 0; col < w; col++)
Expand Down

0 comments on commit af29ceb

Please sign in to comment.