Skip to content

Commit 61cc7e9

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: [TwigBridge] Fix test Remove unnecessary ProgressBar stdout writes (fixes flickering) [Validator] improve translations for albanian ("sq") locale [VarDumper] fix serializing Stub instances Don't resolve the Deprecation error handler mode until a deprecation is triggered bug #30245 fix lost namespace in eval (fizzka) [Twig] removed usage of non-namespaced classes added missing dot Update validators.lt.xlf #30172 Add the missing validation translations for the Luxembourgish … [Debug][ErrorHandler] Preserve next error handler
2 parents 1f0ad51 + 992c3c0 commit 61cc7e9

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Helper/ProgressBar.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,20 +381,17 @@ private function overwrite(string $message): void
381381
$lines = floor(Helper::strlen($message) / $this->terminal->getWidth()) + $this->formatLineCount + 1;
382382
$this->output->clear($lines);
383383
} else {
384-
// Move the cursor to the beginning of the line
385-
$this->output->write("\x0D");
386-
387-
// Erase the line
388-
$this->output->write("\x1B[2K");
389-
390384
// Erase previous lines
391385
if ($this->formatLineCount > 0) {
392-
$this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount));
386+
$message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount).$message;
393387
}
388+
389+
// Move the cursor to the beginning of the line and erase the line
390+
$message = "\x0D\x1B[2K$message";
394391
}
395392
}
396393
} elseif ($this->step > 0) {
397-
$this->output->writeln('');
394+
$message = PHP_EOL.$message;
398395
}
399396

400397
$this->firstRun = false;

0 commit comments

Comments
 (0)