Permalink
Browse files

Merge branch 'hotfix/4168'

Close #4168
Fixes #4167
  • Loading branch information...
2 parents f70e25c + 966055d commit 7b89e916ada6ef14de18b8de5844de5a8f0eee5b @weierophinney weierophinney committed Apr 12, 2013
Showing with 18 additions and 0 deletions.
  1. +18 −0 library/Zend/Console/Adapter/Posix.php
@@ -93,6 +93,24 @@ class Posix extends AbstractAdapter
protected $lastTTYMode = null;
/**
+ * Write a single line of text to console and advance cursor to the next line.
+ *
+ * This override works around a bug in some terminals that cause the background color
+ * to fill the next line after EOL. To remedy this, we are sending the colored string with
+ * appropriate color reset sequences before sending EOL character.
+ *
+ * @link https://github.com/zendframework/zf2/issues/4167
+ * @param string $text
+ * @param null|int $color
+ * @param null|int $bgColor
+ */
+ public function writeLine($text = "", $color = null, $bgColor = null)
+ {
+ $this->write($text, $color, $bgColor);
+ $this->write(PHP_EOL);
+ }
+
+ /**
* Determine and return current console width.
*
* @return int

0 comments on commit 7b89e91

Please sign in to comment.