Skip to content

Commit ed4ae72

Browse files
committed
Fix REPL: Handle :: operator correctly to allow multi-line input (Fixes #24142)
1 parent dc4ad51 commit ed4ae72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

repl/src/dotty/tools/repl/ReplDriver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class ReplDriver(settings: Array[String],
317317

318318
/** Extract possible completions at the index of `cursor` in `expr` */
319319
protected final def completions(cursor: Int, expr: String, state0: State): List[Completion] =
320-
if expr.startsWith(":") then
320+
if expr.startsWith("::") then
321321
ParseResult.commands.collect {
322322
case command if command._1.startsWith(expr) => Completion(command._1, "", List())
323323
}

0 commit comments

Comments
 (0)