Merge pull request #5908 from eatkins/scala-2.12-thin-client-console

Fix echo setting for scala 2.12 thin client console
This commit is contained in:
eugene yokota 2020-10-01 05:33:56 -04:00 committed by GitHub
commit 34d1e62f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -293,4 +293,7 @@ private[sbt] object JLine3 {
}
attributes
}
private[sbt] def isEchoEnabled(map: Map[String, String]): Boolean = {
attributesFromMap(map).getLocalFlag(LocalFlag.ECHO)
}
}

View File

@ -805,7 +805,7 @@ final class NetworkChannel(
override def getWidth: Int = getProperty(_.width, 0).getOrElse(0)
override def getHeight: Int = getProperty(_.height, 0).getOrElse(0)
override def isAnsiSupported: Boolean = getProperty(_.isAnsiSupported, false).getOrElse(false)
override def isEchoEnabled: Boolean = waitForPending(_.isEchoEnabled)
override def isEchoEnabled: Boolean = sbt.internal.util.JLine3.isEchoEnabled(getAttributes)
override def isSuccessEnabled: Boolean =
interactive.get ||
StandardMain.exchange.withState(ContinuousCommands.isInWatch(_, NetworkChannel.this))