Closed rokostik closed 3 months ago
I needed to move some things around and constrain them with build flags in ed47ea3 because eiannone/keyboard
is imported in evaldo
(which is imported by main_wasm.go
) and it requires x/sys/unix
which is not available on wasm.
I am testing it ... The first issue is not crucial, but I will try to figure out the text overflow problem before merge.
I see you already implemented or made possible the interactive display for blocks and spreadsheets which wasn't working in microliner before! That is GREAT!
If refaktor/liner
isn't used anymore it should be removed from go.mod
file using go mod tidy
.
If
refaktor/liner
isn't used anymore it should be removed fromgo.mod
file usinggo mod tidy
.
@stefanb It's still used in DoRyeRepl_OLD not sure if @refaktor wants to keep this code.
Maybe for a while as a backup, until we se that then new liner really works. Currently I still haven't solved the line wrapping issue. We also need to test the microliner based console on windows before merge.
Ok, I made the line overflow (to multiple lines) with syntax highlighting work ... at least when typing in ... haven't worked yet on cursor behaviour, and typing in differente positions but I think this will be easier and it didn't work that well now either way.
It looks like this broke history and emacs keybindings. Ctrl-n/Down, Ctrl-p/Up, and Ctrl-u stopped working after 3efe639ddd8fee7df52bbdd7b801620afc16ba5f.
I made some updates yesterday to microliner ... the main issue, multiline support works much better but still not for all cases (using arrow keys to go back to previous lines).
@cwarden You mean these keybindings don't work if you run Rye console in ansi-term in Emacs or in some other way?
I meant that some of the emacs-style keybindings stopped working in the rye repl when running in a terminal. The combinations, Ctrl-n, -p, -u, are the three I regularly use that I noticed no longer work.
Up/Down/Left/Right not working seems to be a bug in github.com/eiannone/keyboard. In alacritty, keyboard.GetKey()
returns rune 91 and Key 27 for all four keys. In xterm, it returns keyboard.KeyArrowUp, keyboard.KeyArrowDown, etc.
This PR replaces the
refaktor/liner
withMicroliner
in the console repl so it's the same liner for both wasm and console.When testing it out on MacOS I noticed two bugs:
Otherwise everything that I've tested looks fine but we should also test on Linux and Windows before merging.