Uncomment JLine.usingTerminal

This commit is contained in:
Eugene Yokota 2017-01-22 13:13:40 -05:00
parent e8b951c0d1
commit e2c7f58a14
1 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,7 @@
package sbt
package internal
import sbt.internal.util.Show
import sbt.internal.util.{ Show, JLine }
import java.io.File
import Def.{ compiled, flattenLocals, ScopedKey }
@ -65,8 +65,7 @@ object Graph {
// [info] |
// [info] +-quux
def toAscii[A](top: A, children: A => Seq[A], display: A => String, defaultWidth: Int): String = {
// TODO: Fix JLine
val maxColumn = math.max( /*JLine.usingTerminal(_.getWidth)*/ 0, defaultWidth) - 8
val maxColumn = math.max(JLine.usingTerminal(_.getWidth), defaultWidth) - 8
val twoSpaces = " " + " " // prevent accidentally being converted into a tab
def limitLine(s: String): String =
if (s.length > maxColumn) s.slice(0, maxColumn - 2) + ".."