aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/repl/InterpreterLoop.scala3
-rw-r--r--src/dotty/tools/dotc/repl/ammonite/SpecialKeys.scala1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/repl/InterpreterLoop.scala b/src/dotty/tools/dotc/repl/InterpreterLoop.scala
index c6c750b56..14a50fdf1 100644
--- a/src/dotty/tools/dotc/repl/InterpreterLoop.scala
+++ b/src/dotty/tools/dotc/repl/InterpreterLoop.scala
@@ -148,6 +148,7 @@ class InterpreterLoop(compiler: Compiler, config: REPL.Config)(implicit ctx: Con
val quitRegexp = ":q(u(i(t)?)?)?"
val loadRegexp = ":l(o(a(d)?)?)?.*"
val replayRegexp = ":r(e(p(l(a(y)?)?)?)?)?.*"
+ val lastOutput = interpreter.lastOutput()
var shouldReplay: Option[String] = None
@@ -166,7 +167,7 @@ class InterpreterLoop(compiler: Compiler, config: REPL.Config)(implicit ctx: Con
else if (line startsWith ":")
output.println("Unknown command. Type :help for help.")
else
- shouldReplay = interpreter.lastOutput() match { // don't interpret twice
+ shouldReplay = lastOutput match { // don't interpret twice
case Nil => interpretStartingWith(line)
case oldRes =>
oldRes foreach output.print
diff --git a/src/dotty/tools/dotc/repl/ammonite/SpecialKeys.scala b/src/dotty/tools/dotc/repl/ammonite/SpecialKeys.scala
index 1a3278523..3b6a4a5a2 100644
--- a/src/dotty/tools/dotc/repl/ammonite/SpecialKeys.scala
+++ b/src/dotty/tools/dotc/repl/ammonite/SpecialKeys.scala
@@ -9,7 +9,6 @@ package ammonite.terminal
*/
object SpecialKeys {
-
/**
* Lets you easily pattern match on characters modified by ctrl,
* or convert a character into its ctrl-ed version