mirror of https://github.com/sbt/sbt.git
another fix related to #460
This commit is contained in:
parent
fbee96939d
commit
935eed087f
|
|
@ -62,10 +62,16 @@ private object JLine
|
|||
val t = terminal
|
||||
t.synchronized { f(t) }
|
||||
}
|
||||
def createReader() =
|
||||
/** For accessing the JLine Terminal object.
|
||||
* This ensures synchronized access as well as re-enabling echo after getting the Terminal. */
|
||||
def usingTerminal[T](f: jline.Terminal => T): T =
|
||||
withTerminal { t =>
|
||||
val cr = new ConsoleReader
|
||||
t.enableEcho()
|
||||
f(t)
|
||||
}
|
||||
def createReader() =
|
||||
usingTerminal { t =>
|
||||
val cr = new ConsoleReader
|
||||
cr.setBellEnabled(false)
|
||||
cr
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue