summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
index 148b80df12..1e84c6a829 100644
--- a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
@@ -234,7 +234,15 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput
def topLevel = topLevelBase ++ imported
// the first tier of top level objects (doesn't include file completion)
- def topLevelFor(parsed: Parsed) = topLevel flatMap (_ completionsFor parsed)
+ def topLevelFor(parsed: Parsed): List[String] = {
+ topLevel foreach { ca =>
+ ca completionsFor parsed match {
+ case Nil => ()
+ case xs => return xs
+ }
+ }
+ Nil
+ }
// the most recent result
def lastResult = Forwarder(() => ids follow intp.mostRecentVar)