summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/JLineReader.scala')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/JLineReader.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
index 0e66a8b06a..0e9d494206 100644
--- a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
@@ -24,7 +24,12 @@ class JLineReader(interpreter: Interpreter) extends InteractiveReader {
r setBellEnabled false
if (interpreter != null) {
- val comp = new ArgumentCompletor(new Completion(interpreter))
+ // have to specify all delimiters for completion to work nicely
+ val delims = new ArgumentCompletor.AbstractArgumentDelimiter {
+ val delimChars = "(){}[],`;'\" \t".toArray
+ def isDelimiterChar(s: String, pos: Int) = delimChars contains s.charAt(pos)
+ }
+ val comp = new ArgumentCompletor(new Completion(interpreter), delims)
comp setStrict false
r addCompletor comp
}