Permalink
Browse files

Merge branch 'hotfix/4168' into develop

Forward port #4168
  • Loading branch information...
weierophinney committed Apr 12, 2013
2 parents 8548e57 + 966055d commit 80e1f26b9ae29a81c196e83d969b61c87a82c70f
Showing with 18 additions and 0 deletions.
  1. +18 −0 library/Zend/Console/Adapter/Posix.php
@@ -92,6 +92,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.
*

0 comments on commit 80e1f26

Please sign in to comment.