summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala3
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala b/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala
index a775fca92c..cfe932ad0b 100644
--- a/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala
@@ -55,8 +55,9 @@ trait ConsoleReaderHelper extends ConsoleReader {
var linesLeft = if (isPaginationEnabled()) height - 1 else Int.MaxValue
val columnSize = longest + marginSize
val padded = items map ("%-" + columnSize + "s" format _)
+ val groupSize = 1 max (width / columnSize) // make sure it doesn't divide to 0
- padded grouped (width / columnSize) foreach { xs =>
+ padded grouped groupSize foreach { xs =>
println(xs.mkString)
linesLeft -= 1
if (linesLeft <= 0) {
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
index 7430406306..b7baea57fc 100644
--- a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
@@ -102,7 +102,9 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput
def excludeStartsWith: List[String] = List("<") // <byname>, <repeated>, etc.
def excludeNames: List[String] = (anyref.methodNames filterNot anyRefMethodsToShow) :+ "_root_"
- def methodSignatureString(sym: Symbol) = afterTyper(new MethodSymbolOutput(sym).methodString())
+ def methodSignatureString(sym: Symbol) = {
+ IMain stripString afterTyper(new MethodSymbolOutput(sym).methodString())
+ }
def exclude(name: String): Boolean = (
(name contains "$") ||