From d4fb7bd2516063736f771017a33c607331eb7af5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 15 Feb 2013 14:22:56 +0100 Subject: [PATCH] Substract 1char from the width to avoid blank lines in the output on windows --- src/Composer/Command/ShowCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index f861407ed..6ad8cae0f 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -146,6 +146,9 @@ EOT $versionLength = max($versionLength, strlen($this->versionParser->formatVersion($package))); } list($width) = $this->getApplication()->getTerminalDimensions(); + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $width--; + } $writeVersion = $showVersion && ($nameLength + $versionLength + 3 <= $width); $writeDescription = $nameLength + ($showVersion ? $versionLength : 0) + 24 <= $width;