diff --git a/compiler/src/dotty/tools/repl/JLineTerminal.scala b/compiler/src/dotty/tools/repl/JLineTerminal.scala index 3376714e5bee..70f5950b4b4f 100644 --- a/compiler/src/dotty/tools/repl/JLineTerminal.scala +++ b/compiler/src/dotty/tools/repl/JLineTerminal.scala @@ -9,6 +9,7 @@ import dotty.tools.dotc.util.SourceFile import org.jline.reader import org.jline.reader.Parser.ParseContext import org.jline.reader._ +import org.jline.reader.impl.LineReaderImpl import org.jline.reader.impl.history.DefaultHistory import org.jline.terminal.TerminalBuilder import org.jline.utils.AttributedString @@ -60,6 +61,8 @@ final class JLineTerminal extends java.io.Closeable { // this is supplied from the EOFError.getMissing() method .variable(LIST_MAX, 400) // Ask user when number of completions exceed this limit (default is 100). .variable(BLINK_MATCHING_PAREN, 0L) // Don't blink the opening paren after typing a closing paren. + .variable(WORDCHARS, + LineReaderImpl.DEFAULT_WORDCHARS.filterNot("*?.[]~=/&;!#%^(){}<>".toSet)) // Finer grained word boundaries .option(INSERT_TAB, true) // At the beginning of the line, insert tab instead of completing. .option(AUTO_FRESH_LINE, true) // if not at start of line before prompt, move to new line. .option(DISABLE_EVENT_EXPANSION, true) // don't process escape sequences in input @@ -76,6 +79,8 @@ final class JLineTerminal extends java.io.Closeable { val highlighted = SyntaxHighlighting.highlight(buffer) AttributedString.fromAnsi(highlighted) } + def setErrorPattern(errorPattern: java.util.regex.Pattern): Unit = {} + def setErrorIndex(errorIndex: Int): Unit = {} } /** Provide multi-line editing support */ diff --git a/project/Build.scala b/project/Build.scala index e3f75a733f7a..a0a7a7046ac7 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -493,9 +493,9 @@ object Build { libraryDependencies ++= Seq( "org.scala-lang.modules" % "scala-asm" % "7.3.1-scala-1", // used by the backend Dependencies.`compiler-interface`, - "org.jline" % "jline-reader" % "3.9.0", // used by the REPL - "org.jline" % "jline-terminal" % "3.9.0", - "org.jline" % "jline-terminal-jna" % "3.9.0" // needed for Windows + "org.jline" % "jline-reader" % "3.15.0", // used by the REPL + "org.jline" % "jline-terminal" % "3.15.0", + "org.jline" % "jline-terminal-jna" % "3.15.0" // needed for Windows ), // For convenience, change the baseDirectory when running the compiler diff --git a/project/build.properties b/project/build.properties index a919a9b5f46b..654fe70c42c7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.8 +sbt.version=1.3.12