Temporary fix for #7371

This fix disables vi-style effects (most notably parenthesis matching) if the terminal is inside emacs.

The proper fix is to update to JLine 3.24.0 where this check has been implemented in JLine proper.
This commit is contained in:
Heikki Vesalainen 2023-10-26 21:17:37 +03:00
parent 25f2ea03ea
commit 126d2419bd
1 changed files with 5 additions and 0 deletions

View File

@ -110,6 +110,11 @@ object LineReader {
override def readLine(prompt: String, mask: Option[Char]): Option[String] = {
val term = JLine3(terminal)
val reader = LineReaderBuilder.builder().terminal(term).completer(completer(parser)).build()
if (Util.isEmacs) {
reader.setKeyMap(JLineReader.SAFE)
}
try {
inputrcFileContents.foreach { bytes =>
InputRC.configure(