diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala b/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala index 614df996f1..57b0cd9104 100644 --- a/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala +++ b/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala @@ -65,7 +65,7 @@ trait FileBackedHistory extends JLineHistory with JPersistentHistory { historyFile.writeAll(lines: _*) } - def load() = { + def load(): Unit = { val lines = historyFile.lines().toIndexedSeq repldbg("Loading " + lines.size + " into history.") @@ -76,6 +76,7 @@ trait FileBackedHistory extends JLineHistory with JPersistentHistory { repldbg("File exceeds maximum size: truncating to " + maxSize + " entries.") sync() } + moveToEnd() } def flush(): Unit = { val toAppend = drainBufferFile() |