From 2060b631ab49c2eb65c37d06e322b9294dbb0b22 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 7 Feb 2011 06:52:22 +0000 Subject: Fixed a history bug with it not starting at the... Fixed a history bug with it not starting at the right index. No review. --- .../scala/tools/nsc/interpreter/session/FileBackedHistory.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- cgit v1.2.3