From b5d6df22ab6bae982b6c840e1563d4bcbadd384b Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 27 Apr 2016 15:00:02 +0200 Subject: Fix `:...` commands printing erroneous messages on next newline --- src/dotty/tools/dotc/repl/InterpreterLoop.scala | 3 ++- src/dotty/tools/dotc/repl/ammonite/SpecialKeys.scala | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3