Writing
scala> class 馃槂
and then backspace 3 times confuses the repl
scala> cclas
There is probably a wrong computation of the current cursor in presence of unicode characters.
is this a JLine bug ?
Cannot be reproduced.
Copy paste class 馃槂 into the REPL and then delete 3 characters. It still happens.
I'm able to reproduce this FWIW
Can you reproduce this using the Scala 2.13.3 repl too? If so, it's a JLine bug and should be filed at https://github.com/jline/jline3/
Running on WSL ubuntu, I can't reproduce the problem in either the dotty REPL or the scala 2.13.3 REPL.
Running in the sbt scala console under Intellij IDE, unable to reproduce the problem.
Running on the Windows jdk, there are problems in both dotty and scala 2.13.3, although they differ. Below is a discription of what I think I'm getting, but I need to thoroughly verify the specifics of my Windows environment, since I'm having other problems with sbt.
Running dotty REPL in mintty/bash on Windows 10. the problem occurs exactly as described by @nicolasstucki.
Running the Scala 2.13.3 REPL in mintty/bash, there is an issue where all but the initial character can be deleted, but the initial 'c' remains.
Interestingly, if I enter the REPL from SBT, the problems go away, it only occurs when running the dotr script from the console.
Does it work when using the new Windows Terminal (https://github.com/microsoft/terminal) ?
Here's my experiment, performed on Windows 10 x64
Here's what remains:
scala> cclas
In case it matters, the only way I have been able to create a usable sbt environment (even when running cygwin bash) is to run the"sbt.bat"windows script.