瀏覽代碼

In console terms columns are width and rows are height

Miha Vrhovnik 13 年之前
父節點
當前提交
445fd2f9aa
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Symfony/Component/Console/Application.php

+ 2 - 2
src/Symfony/Component/Console/Application.php

@@ -801,7 +801,7 @@ class Application
         }
 
         if (preg_match("{rows.(\d+);.columns.(\d+);}i", exec('stty -a | grep columns'), $match)) {
-            return $match[1];
+            return $match[2];
         }
     }
 
@@ -817,7 +817,7 @@ class Application
         }
 
         if (preg_match("{rows.(\d+);.columns.(\d+);}i", exec('stty -a | grep columns'), $match)) {
-            return $match[2];
+            return $match[1];
         }
     }