Closed
Description
Symfony version(s) affected: 4.1, probably lower as well
Description
When working on #22225, i noticed something goes wrong with the CLI unset codes as soon a formatted text spans multiple lines, and the output exceeds the window ($LINES
), thus when the scrollbar becomes active.
See #22225 (comment)
How to reproduce
My console window ($LINES x $COLUMNS) is set to 12 x 72
I quickly patched the AboutCommand
as follow:
diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php
index b6860a2..973c1e1 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php
@@ -56,6 +56,9 @@ EOT
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
+ $output->writeln(str_repeat("pre <error>foo bar baz</error> post", 15));
+ return 0;
+
$io = new SymfonyStyle($input, $output);
Now running it during 1 session (my scrollbar is invisible here btw 😅)
1st 👍
2nd 👍
3rd 👎
Possible Solution
Not sure, I hope someone can explain what's happening technically.
Additional context