Skip to content

Commit 3e2af77

Browse files
benkobalogallanrenucci
authored andcommitted
Fix #1369 Print newline after interpreted commands
1 parent 2318433 commit 3e2af77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,11 @@ class ReplDriver(settings: Array[String],
200200
private def interpret(res: ParseResult)(implicit state: State): State =
201201
res match {
202202
case parsed: Parsed if parsed.trees.nonEmpty =>
203-
compile(parsed)
203+
val newState = compile(parsed)
204204
.withHistory(parsed.sourceCode :: state.history)
205205
.newRun(compiler, rootCtx)
206+
out.println() // Prints newline after commands, also fixes #1369
207+
newState
206208

207209
case SyntaxErrors(src, errs, _) =>
208210
displayErrors(errs)

0 commit comments

Comments
 (0)