Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Console posix adapter writeLine() background color bleeding through to the next line. #4167

Closed
Thinkscape opened this issue Apr 2, 2013 · 1 comment
Assignees
Milestone

Comments

@Thinkscape
Copy link
Member

When using $console->writeLine() with background color, the color will bleed through and fill the entire next line in the console. I've noticed this bug on MacOS but I believe it can appear on other systems.

This happens because EOL character occurs before the background color reset sequence \x1b[0;49m which some terminals might interpret as pictured on the screenshot below.

A PR to fix this will follow.

Screen Shot 2013-04-02 at 3 39 42 PM

Test code:

$console->write('Console->write(..., Color::NORMAL, Color::YELLOW)', ColorInterface::NORMAL, ColorInterface::YELLOW);
$console->writeLine('Console->writeLine(...)');
$console->writeLine('Console->writeLine(...)');
$console->writeLine('Console->writeLine(..., Color::NORMAL, Color::YELLOW)', ColorInterface::NORMAL, ColorInterface::YELLOW);
$console->writeLine('Console->writeLine(...)');
$console->writeLine('Console->writeLine(...)');
@Thinkscape
Copy link
Member Author

After fix:
Screen Shot 2013-04-02 at 3 50 20 PM

@ghost ghost assigned weierophinney Apr 12, 2013
weierophinney added a commit that referenced this issue Apr 12, 2013
Fix #4167 - Console posix adapter writeLine() background color bleeding through to the next line.
weierophinney added a commit that referenced this issue Apr 12, 2013
gianarb pushed a commit to zendframework/zend-console that referenced this issue May 15, 2015
…e() background color bleeding through to the next line.
weierophinney added a commit to zendframework/zend-console that referenced this issue May 15, 2015
…otfix/console-writeline

Fix zendframework/zendframework#4167 - Console posix adapter writeLine() background color bleeding through to the next line.
weierophinney added a commit to zendframework/zend-console that referenced this issue May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants