summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-14 06:30:13 +0000
committerPaul Phillips <paulp@improving.org>2010-12-14 06:30:13 +0000
commitbda52e41b2a233f8518add205e990afe0111119b (patch)
treeff4316a8bb5e573d918b0b438917a94c8df9a712 /src
parent7f814ff6be721ed58a0b9b855db214873b430fb3 (diff)
downloadscala-bda52e41b2a233f8518add205e990afe0111119b.tar.gz
scala-bda52e41b2a233f8518add205e990afe0111119b.tar.bz2
scala-bda52e41b2a233f8518add205e990afe0111119b.zip
An alteration in jline had hosed the ability to...
An alteration in jline had hosed the ability to resume from ctrl-Z. Fixed it. No review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala3
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/JLineReader.scala1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
index 8ea4d74369..4fdcbafa83 100644
--- a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
@@ -17,6 +17,7 @@ trait InteractiveReader {
protected def readOneLine(prompt: String): String
val interactive: Boolean
def init(): Unit = ()
+ def reset(): Unit = ()
def redrawLine(): Unit = ()
def currentLine = "" // the current buffer contents, if available
@@ -24,7 +25,7 @@ trait InteractiveReader {
def handler: Catcher[String] = {
case e: ClosedByInterruptException => system.error("Reader closed by interrupt.")
// Terminal has to be re-initialized after SIGSTP or up arrow etc. stop working.
- case e: IOException if restartSystemCall(e) => init() ; readLine(prompt)
+ case e: IOException if restartSystemCall(e) => reset() ; readLine(prompt)
}
catching(handler) { readOneLine(prompt) }
}
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
index 7e3746963f..652321faf4 100644
--- a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
@@ -24,6 +24,7 @@ class JLineReader(interpreter: Interpreter) extends InteractiveReader {
Some(h)
}
override lazy val completion = Option(interpreter) map (x => new Completion(x))
+ override def reset() = consoleReader.getTerminal().reset()
override def init() = consoleReader.getTerminal().init()
override def redrawLine() = {
consoleReader.flush()