Typeahead with held-down arrow
tom-adsfund opened this issue · 8 comments
Holding down an arrow key breaks the typeahead.
Using: Kitty on Linux, and liq.jar
Also, doing the same in insert mode breaks things.
I'd be very tempted to rely on a dedicated library for the terminal -- because of all the cases.
This one looks good: https://github.com/mabe02/lanterna
I have commitet a fix for typeaheadapp and commandapp. They have been completely rewritten to use sliders directly, making the code more robust.
I have also made commandapp reuse the typeaheadapp to avoid duplicate code.
Some extensions to typeahead were made to support more usecases.
Next up will be to reuse typeahead app in the findfileapp.
salza.dk/liq.jar has also been updated.
It seems like the bug - at least in one case - is still there: if I start liq.jar, and then press tab, then hold down the up arrow, it corrupts the buffer/slider. Then if I try to work within the app to copy and paste the corrupted slider into a new file, the typeahead also fails.
My immediate reaction is that I would move to using Lanterna for terminal input: their model is like painting into the blocks of the terminal, and they will handle all the input/output details to ensure things aren't corrupted.
In the process of making the editor work with Lanterna, I expect you'll simplify the internals so that Liquid is focused only on the most important Liquid-related things.
Good luck!
If it also happens when you just start Liquid, it does not have anything to do with typeahead. At least I fixed some other problem then :-)
I have not experienced any problems like that when using Terminology, xfce-terminal or xterm. I will try with kitty when I get to a computer with proper opengl support. Maybe it has something to do with raw-mode or supported escape sequences in kitty.
You're right! I tried it in my previous favorite terminal (Terminator) and there's no issue, so I'm guessing, since it works in all the ones you've said and also if I switch to terminal in Ubuntu, that it's probably a bug in Kitty.
So for now I'm actually much more relaxed about Liquid, and I'll probably open a bug report with Kitty!
@mogenslund Hey, maybe cross linking issues will get interest in the project! (Only joking.)
OK, so it seems like it was a bug that's been fixed in Kitty within the last 25 days!
Like you say, it's good that you were able to refactor some code in this whole process. Now we can move on to more important problems!