-
-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiselect spams the terminal #89
Comments
I'm not sure but I checked it and I think it's an issue of Alacritty. Alacritty does not seem to listen correctly to ANSI escape sequences. |
Hi @jamen! Does this happen for you in other terminals? |
@terkelg |
I made another test and now I'm pretty sure it's an issue with alacritty itself. const w = str => process.stdout.write(str);
w(`This is the first line\n`);
w(`This is the second line\n`);
w(`And this is the third line`);
// Move cursor one line upward
w(`\u001b[1F`); // CPL
// Move cursor to the 12th column (after `the`)
w('\u001b[12G'); // CHA
// Erase to end of screen
w('\u001b[J'); // ED
/* EXPECTED RESULT:
This is the first line
This is the
*/
/* ACTUAL RESULT (with Alacritty):
This is the first line
This is the second line
And this is
*/
// Cursor does not move upward I also ran this in a normal terminal just to be sure and it gave me the expected result. I'll create an issue on Alacritty repo. |
I tried the same script with the CUU escape sequence ( |
@terkelg @DrunkenPoney I did not see this on other terminals. I figured it had something to do with Alacritty but didn't know where to open the issue. I tried the changes with my test and it works! But is this more of an Alacritty issue and prompts is more proper without the changes? Either way thanks for investigating it. |
I would prefer to keep it simple and not add too much terminal-specific code. It seems like Alacritty is aware of it and working on implementing it. What do you guys think? |
@terkelg I think you're right. It's not a Prompts issue but an Alacritty issue. In my opinion it would be preferable to not merge my pull request since it replaces a sequence defined by the ANSI standards. It's Alacritty which doesn't implement all ANSI sequences yet. |
Agreed |
Great module! I use this often for small scripts.
I've had an issue with the multiselect, where moving the selection causes it to improperly replace the last lines, and your terminal gets spammed.
Edit: I should add I'm using Alacritty terminal.
The text was updated successfully, but these errors were encountered: