summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-31 20:13:29 -0800
committerPaul Phillips <paulp@improving.org>2013-01-31 20:13:29 -0800
commitd1b6d8b20f55d0b11102ced679b54ec5ea208f8f (patch)
treef5f3b3ca8044fae9bded0a9de771fd3edf23cded /src
parentb573c287d2eb47cd06f27197c650ed49faa8ca20 (diff)
parent5f85fe52d45199e3bf9a130b3fe91e3b44f8bd88 (diff)
downloadscala-d1b6d8b20f55d0b11102ced679b54ec5ea208f8f.tar.gz
scala-d1b6d8b20f55d0b11102ced679b54ec5ea208f8f.tar.bz2
scala-d1b6d8b20f55d0b11102ced679b54ec5ea208f8f.zip
Merge pull request #2046 from JamesIry/2.10.x_SI-4714
SI-4714 Initialize history while initializing the REPL's reader
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/JLineReader.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
index 10f972452f..5fd5b41625 100644
--- a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
@@ -37,6 +37,9 @@ class JLineReader(_completion: => Completion) extends InteractiveReader {
}
class JLineConsoleReader extends ConsoleReader with ConsoleReaderHelper {
+ if ((history: History) ne NoHistory)
+ this setHistory history
+
// working around protected/trait/java insufficiencies.
def goBack(num: Int): Unit = back(num)
def readOneKey(prompt: String) = {
@@ -51,8 +54,6 @@ class JLineReader(_completion: => Completion) extends InteractiveReader {
// A hook for running code after the repl is done initializing.
lazy val postInit: Unit = {
this setBellEnabled false
- if ((history: History) ne NoHistory)
- this setHistory history
if (completion ne NoCompletion) {
val argCompletor: ArgumentCompleter =