diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/printing/SyntaxHighlighting.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/repl/AmmoniteReader.scala | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala b/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala index 932b980db..c933dd0b9 100644 --- a/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -51,7 +51,7 @@ object SyntaxHighlighting { private val typeEnders = '{' :: '}' :: ')' :: '(' :: '=' :: ' ' :: ',' :: '.' :: '\n' :: Nil - def apply(chars: Iterable[Char]): Vector[Char] = { + def apply(chars: Iterable[Char]): Iterable[Char] = { var prev: Char = 0 var remaining = chars.toStream val newBuf = new StringBuilder @@ -281,6 +281,6 @@ object SyntaxHighlighting { prev = curr } - newBuf.toVector + newBuf.toIterable } } diff --git a/src/dotty/tools/dotc/repl/AmmoniteReader.scala b/src/dotty/tools/dotc/repl/AmmoniteReader.scala index 614654a28..435269081 100644 --- a/src/dotty/tools/dotc/repl/AmmoniteReader.scala +++ b/src/dotty/tools/dotc/repl/AmmoniteReader.scala @@ -61,7 +61,7 @@ class AmmoniteReader(val interpreter: Interpreter)(implicit ctx: Context) extend if (ctx.useColors) SyntaxHighlighting(buffer) else buffer - val ansiBuffer = Ansi.Str.parse(coloredBuffer) + val ansiBuffer = Ansi.Str.parse(coloredBuffer.toVector) val (newBuffer, cursorOffset) = SelectionFilter.mangleBuffer( selectionFilter, ansiBuffer, cursor, Ansi.Reversed.On ) |