handle empty help list in aligned printing

This commit is contained in:
Mark Harrah 2013-06-17 12:06:13 -04:00
parent 0780a6c08a
commit 74438d0c72
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ object CommandUtil
try { state.configuration.provider.scalaProvider.launcher.bootDirectory }
catch { case e: NoSuchMethodError => new File(".").getAbsoluteFile }
def aligned(pre: String, sep: String, in: Seq[(String, String)]): Seq[String] =
def aligned(pre: String, sep: String, in: Seq[(String, String)]): Seq[String] = if(in.isEmpty) Nil else
{
val width = in.map(_._1.length).max
in.map { case (a, b) => (pre + fill(a, width) + sep + b) }