Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 94aa211

Browse filesBrowse files
committed
Remove unnecessary ProgressBar stdout writes (fixes flickering)
1 parent ce7afc2 commit 94aa211
Copy full SHA for 94aa211

File tree

1 file changed

+5
-8
lines changed
Filter options

1 file changed

+5
-8
lines changed

‎src/Symfony/Component/Console/Helper/ProgressBar.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/ProgressBar.php
+5-8Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,19 +466,16 @@ private function overwrite($message)
466466
{
467467
if ($this->overwrite) {
468468
if (!$this->firstRun) {
469-
// Move the cursor to the beginning of the line
470-
$this->output->write("\x0D");
471-
472-
// Erase the line
473-
$this->output->write("\x1B[2K");
474-
475469
// Erase previous lines
476470
if ($this->formatLineCount > 0) {
477-
$this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount));
471+
$message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount) . $message;
478472
}
473+
474+
// Move the cursor to the beginning of the line and erase the line
475+
$message = "\x0D\x1B[2K$message";
479476
}
480477
} elseif ($this->step > 0) {
481-
$this->output->writeln('');
478+
$message = PHP_EOL . $message;
482479
}
483480

484481
$this->firstRun = false;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.