summaryrefslogtreecommitdiff
path: root/src/repl-jline/scala/tools/nsc/interpreter
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-09-02 14:44:56 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-09-23 15:43:50 +1000
commit9f8961c58a01e83cf4bc782ac03dd9919983ce30 (patch)
tree07e7cea7780ddf2583b89db2440e488974a6c609 /src/repl-jline/scala/tools/nsc/interpreter
parentdf704ef7389ff6265afc1278783489ee97ee4ce7 (diff)
downloadscala-9f8961c58a01e83cf4bc782ac03dd9919983ce30.tar.gz
scala-9f8961c58a01e83cf4bc782ac03dd9919983ce30.tar.bz2
scala-9f8961c58a01e83cf4bc782ac03dd9919983ce30.zip
Remove the old REPL tab completion implementation
We kept it around behind an option in 2.11.x, but we can jettison it in 2.12.x.
Diffstat (limited to 'src/repl-jline/scala/tools/nsc/interpreter')
-rw-r--r--src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala b/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala
index b5db4c2098..dc33223f4b 100644
--- a/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala
+++ b/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala
@@ -16,7 +16,7 @@ import jconsole.history.{History => JHistory}
import scala.tools.nsc.interpreter
-import scala.tools.nsc.interpreter.{Completion, JLineCompletion, NoCompletion}
+import scala.tools.nsc.interpreter.{Completion, NoCompletion}
import scala.tools.nsc.interpreter.Completion.Candidates
import scala.tools.nsc.interpreter.session.History
@@ -125,21 +125,16 @@ private class JLineConsoleReader extends jconsole.ConsoleReader with interpreter
// adapt the JLine completion interface
def completer =
new Completer {
- val tc = completion.completer()
+ val tc = completion
def complete(_buf: String, cursor: Int, candidates: JList[CharSequence]): Int = {
val buf = if (_buf == null) "" else _buf
- val Candidates(newCursor, newCandidates) = tc.complete(buf, cursor)
+ val Candidates(newCursor, newCandidates) = completion.complete(buf, cursor)
newCandidates foreach (candidates add _)
newCursor
}
}
- // a last bit of nastiness: parsing help depending on the flavor of completer (fixme)
completion match {
- case _: JLineCompletion =>
- val jlineCompleter = new ArgumentCompleter(new JLineDelimiter, completer)
- jlineCompleter setStrict false
- this addCompleter jlineCompleter
case NoCompletion => ()
case _ => this addCompleter completer
}