Merge pull request #5792 from eatkins/windows-ctrl-c

Allow windows console users to exit with ctrl+c
This commit is contained in:
eugene yokota 2020-08-23 13:13:07 -04:00 committed by GitHub
commit 8fe7e33a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -108,9 +108,12 @@ private[sbt] object JLine3 {
}
case _ => throw new ClosedException
}
if (res == 4 && term.prompt.render().endsWith(term.prompt.mkPrompt()))
throw new ClosedException
res
res match {
case 3 /* ctrl+c */ => throw new ClosedException
case 4 /* ctrl+d */ if term.prompt.render().endsWith(term.prompt.mkPrompt()) =>
throw new ClosedException
case r => r
}
}
}
override val output: OutputStream = new OutputStream {