Skip to content
This repository
Browse code

Merge branch 'hotfix/4168' into develop

Forward port #4168
  • Loading branch information...
commit 80e1f26b9ae29a81c196e83d969b61c87a82c70f 2 parents 8548e57 + 966055d
Matthew Weier O'Phinney weierophinney authored

Showing 1 changed file with 18 additions and 0 deletions. Show diff stats Hide diff stats

  1. +18 0 library/Zend/Console/Adapter/Posix.php
18 library/Zend/Console/Adapter/Posix.php
@@ -93,6 +93,24 @@ class Posix extends AbstractAdapter
93 93 protected $lastTTYMode = null;
94 94
95 95 /**
  96 + * Write a single line of text to console and advance cursor to the next line.
  97 + *
  98 + * This override works around a bug in some terminals that cause the background color
  99 + * to fill the next line after EOL. To remedy this, we are sending the colored string with
  100 + * appropriate color reset sequences before sending EOL character.
  101 + *
  102 + * @link https://github.com/zendframework/zf2/issues/4167
  103 + * @param string $text
  104 + * @param null|int $color
  105 + * @param null|int $bgColor
  106 + */
  107 + public function writeLine($text = "", $color = null, $bgColor = null)
  108 + {
  109 + $this->write($text, $color, $bgColor);
  110 + $this->write(PHP_EOL);
  111 + }
  112 +
  113 + /**
96 114 * Determine and return current console width.
97 115 *
98 116 * @return int

0 comments on commit 80e1f26

Please sign in to comment.
Something went wrong with that request. Please try again.