Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mikem8361 committed Sep 2, 2022
1 parent 71f6312 commit 381cb6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Microsoft.Diagnostics.Repl/ConsoleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,9 @@ private void ClearLine()
return;
}

if (m_clearLine == null || m_clearLine.Length != Console.WindowWidth) {
m_clearLine = "\r" + new string(' ', Console.WindowWidth - 1);
int width = Console.WindowWidth;
if (m_clearLine == null || width != m_clearLine.Length) {
m_clearLine = "\r" + (width > 0 ? new string(' ', width - 1) : "");
}

Console.Write(m_clearLine);
Expand Down

0 comments on commit 381cb6d

Please sign in to comment.