mirror of https://github.com/sbt/sbt.git
Re-fix console and JLine bug
Fixes #3482 take 3 There are two bugs related REPL and JLine. 1. JLine getting disabled (up arrow not working) on the second run of `console` task. 2. Typed characters not showing up even on the `console` task. The first issue was fixed by #4054 which added `t.init`. When I noticed the second problem, I fixed it in #4082 (adds `t.restore`) but undid the first fix. This attempts to fix both the issues.
This commit is contained in:
parent
334789c919
commit
a798c4adff
|
|
@ -41,7 +41,8 @@ final class Console(compiler: AnalyzingCompiler) {
|
|||
implicit log: Logger): Try[Unit] = {
|
||||
def console0() =
|
||||
compiler.console(classpath, options, initialCommands, cleanupCommands, log)(loader, bindings)
|
||||
JLine.usingTerminal { _ =>
|
||||
JLine.usingTerminal { t =>
|
||||
t.init
|
||||
Run.executeTrapExit(console0, log)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue