This commit is contained in:
Fabien Potencier 2012-12-11 15:06:57 +01:00
parent 8bbc64d3ec
commit 7200703089
2 changed files with 10 additions and 7 deletions

View File

@ -384,10 +384,13 @@ class ProgressHelper extends Helper
*/
private function overwrite(OutputInterface $output, $messages)
{
$output->write("\x0D"); // carriage return
// carriage return
$output->write("\x0D");
if ($this->lastMessagesLength!==null) {
$output->write(str_repeat("\x20", $this->lastMessagesLength)); //clear the line with the length of the last message
$output->write("\x0D"); // carriage return
// clear the line with the length of the last message
$output->write(str_repeat("\x20", $this->lastMessagesLength));
// carriage return
$output->write("\x0D");
}
$output->write($messages);