Skip to content

Commit

Permalink
(GH-875) Pad progress output line to console width
Browse files Browse the repository at this point in the history
Pad the progress output to ensure we cover the full width of the console,
leaving no artifacts behind.
  • Loading branch information
Bill Long authored and ferventcoder committed Aug 3, 2016
1 parent caa5fb3 commit b7548cd
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -129,7 +129,7 @@ public override void WriteProgress(long sourceId, ProgressRecord record)
}

// http://stackoverflow.com/a/888569/18475
Console.Write("\rProgress: {0}% - {1}".format_with(record.PercentComplete.to_string(), record.StatusDescription.PadRight(50, ' ')));
Console.Write("\rProgress: {0}% - {1}".format_with(record.PercentComplete.to_string(), record.StatusDescription).PadRight(Console.WindowWidth));
}

public override void WriteVerboseLine(string message)
Expand Down

0 comments on commit b7548cd

Please sign in to comment.