diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-04-27 15:00:02 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-04-28 11:00:40 +0200 |
commit | b5d6df22ab6bae982b6c840e1563d4bcbadd384b (patch) | |
tree | 40ea1a5f8ec468588a02b7dabeb057051533038d /src/dotty/tools/dotc/repl/InterpreterLoop.scala | |
parent | 4d53d338e59beb240716508e0b6d32c182a17df6 (diff) | |
download | dotty-b5d6df22ab6bae982b6c840e1563d4bcbadd384b.tar.gz dotty-b5d6df22ab6bae982b6c840e1563d4bcbadd384b.tar.bz2 dotty-b5d6df22ab6bae982b6c840e1563d4bcbadd384b.zip |
Fix `:...` commands printing erroneous messages on next newline
Diffstat (limited to 'src/dotty/tools/dotc/repl/InterpreterLoop.scala')
-rw-r--r-- | src/dotty/tools/dotc/repl/InterpreterLoop.scala | 3 |
1 files changed, 2 insertions, 1 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 |