mirror of https://github.com/sbt/sbt.git
Use jline2 for raw mode
Using the JLine3 implementation of raw mode breaks the scala console for the console channel.
This commit is contained in:
parent
b678d2115f
commit
a19ec581c0
|
|
@ -785,10 +785,13 @@ object Terminal {
|
|||
system.setSize(new org.jline.terminal.Size(width, height))
|
||||
|
||||
override def withRawInput[T](f: => T): T = term.synchronized {
|
||||
val prev = JLine3.enterRawMode(system)
|
||||
try f
|
||||
catch { case _: InterruptedIOException => throw new InterruptedException } finally {
|
||||
setAttributes(prev)
|
||||
try {
|
||||
term.init()
|
||||
term.setEchoEnabled(false)
|
||||
f
|
||||
} catch { case _: InterruptedIOException => throw new InterruptedException } finally {
|
||||
term.restore()
|
||||
term.setEchoEnabled(true)
|
||||
}
|
||||
}
|
||||
override def isColorEnabled: Boolean =
|
||||
|
|
|
|||
Loading…
Reference in New Issue