Long input lines cause some sort of wrapping error
If you have an input line that is more than 80 characters long, the Scala REPL appears to echo it with a carriage return (\r) character at the 80 character boundary. This confuses the plugin because it then can't get the input line properly since some of it gets put on the next line by Sublime Text. Hence the output view ends up messed up a bit.
This one is eluding a solution because we can't reproduce it outside Sublime Text. Running the same commands from Python 3 outside do not suffer from the same symptom. So, there is something different about the Sublime
Note: this bug occurs even if we change the shell command that that the plugin uses to something like
scala <file.scala >/tmp/x.txt
When run from the plugin this command results in x.txt having the spurious carriage return, but if we run it from an terminal shell or from Python outside ST the carriage return does not show up. This tells us at least that it doesn't appear to be anything to do with ST doing word wrapping or something to the output.