Closed System-Glitch closed 3 years ago
It seems to be a problem in Konsole with this library. This library works good on all common terminals, except Konsole. Also, escape characters work well on Konsole, so it seems to be a problem in this library.
Needs to be investigated...
I investigated, and I believe I found the cause: resetPrompt
was using PreviousLine()
instead of Up()
.
PreviousLine()
prints \e[1F
, which is apparently not recognized by Konsole. I didn't find this control code anywhere in VT100 and ANSI references.
On the other hand, Up()
writes \e[1A
, which works as expected. Using this makes it work perfectly in both the VSCode integrated terminal and Konsole. This would require a little bit of testing on Windows and MacOS though, but this is a good starting point.
I will open a PR very soon.
@AlecAivazis Can this be merged, since this is a critical issue?
@infixint943 i appreciate your enthusiasm but we need to thoroughly test these changes before merging them.
When I press an arrow (or a key for filtering) in a select question, the whole question and options are rewritten.
OS: Ubuntu 20.04 Terminal: Konsole 19.12.3 / Bash Lib version: v2.1.1
This works properly when run from the VSCode integrated terminal but not from Konsole.
This is from Github CLI usage, but it reproduces when I copy, paste and run the example in the README.
Related to #101, it looks like the issue in this comment is exactly the same.