diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-07 06:52:22 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-07 06:52:22 +0000 |
commit | 2060b631ab49c2eb65c37d06e322b9294dbb0b22 (patch) | |
tree | e2469de063c37ffcec128a0ff958034f418271a2 | |
parent | 5c18620fa475d32de62472de55a6bcec3da1b515 (diff) | |
download | scala-2060b631ab49c2eb65c37d06e322b9294dbb0b22.tar.gz scala-2060b631ab49c2eb65c37d06e322b9294dbb0b22.tar.bz2 scala-2060b631ab49c2eb65c37d06e322b9294dbb0b22.zip |
Fixed a history bug with it not starting at the...
Fixed a history bug with it not starting at the right index. No review.
-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() |