fix:修复BUG/升级1.1.6版本
This commit is contained in:
@@ -53,7 +53,6 @@ final class ProgressBar
|
||||
private int $startTime;
|
||||
private int $stepWidth;
|
||||
private float $percent = 0.0;
|
||||
private int $formatLineCount;
|
||||
private array $messages = [];
|
||||
private bool $overwrite = true;
|
||||
private $terminal;
|
||||
@@ -438,8 +437,6 @@ final class ProgressBar
|
||||
} else {
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
$this->formatLineCount = substr_count($this->format, "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,7 +453,7 @@ final class ProgressBar
|
||||
if ($this->overwrite) {
|
||||
if (null !== $this->previousMessage) {
|
||||
if ($this->output instanceof ConsoleSectionOutput) {
|
||||
$messageLines = explode("\n", $message);
|
||||
$messageLines = explode("\n", $this->previousMessage);
|
||||
$lineCount = \count($messageLines);
|
||||
foreach ($messageLines as $messageLine) {
|
||||
$messageLineLength = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $messageLine));
|
||||
@@ -466,7 +463,8 @@ final class ProgressBar
|
||||
}
|
||||
$this->output->clear($lineCount);
|
||||
} else {
|
||||
for ($i = 0; $i < $this->formatLineCount; ++$i) {
|
||||
$lineCount = substr_count($this->previousMessage, "\n");
|
||||
for ($i = 0; $i < $lineCount; ++$i) {
|
||||
$this->cursor->moveToColumn(1);
|
||||
$this->cursor->clearLine();
|
||||
$this->cursor->moveUp();
|
||||
|
||||
Reference in New Issue
Block a user