Skip to content

Commit 947b575

Browse files
committed
Prints new line when exiting the REPL
Before: ```scala > repl scala> :quit [success] Total time: 8 s, completed Oct 9, 2017 2:31:06 PM > repl scala> ctrl-d [success] Total time: 7 s, completed Oct 9, 2017 2:31:18 PM ``` Now: ```scala > repl scala> :quit [success] Total time: 8 s, completed Oct 9, 2017 2:30:41 PM > repl scala> ctrl-d [success] Total time: 4 s, completed Oct 9, 2017 2:30:48 PM ```
1 parent 66a0e28 commit 947b575

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/repl/ReplDriver.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ class ReplDriver(settings: Array[String],
132132
@tailrec final def runUntilQuit(state: State = initState): State = {
133133
val res = readLine()(state)
134134

135-
if (res == Quit) state
135+
if (res == Quit) {
136+
out.println()
137+
state
138+
}
136139
else {
137140
// readLine potentially destroys the run, so a new one is needed for the
138141
// rest of the interpretation:

0 commit comments

Comments
 (0)