Skip to content
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

Bug: ask prompt is not clearing correctly, causing ask prompt and answer to duplicate and cursor to move in-between data #265

Closed
sarlotha opened this issue Dec 12, 2024 · 2 comments · Fixed by #261
Assignees
Labels
bug Broken or unexpected

Comments

@sarlotha
Copy link

Image
@balupton balupton added the bug Broken or unexpected label Dec 20, 2024
@balupton
Copy link
Member

This might be due to a terminal resize, as I've noticed that resizing the terminal during a brew upgrade will cause brew to continue on the old row location, which is now in-between data. Perhaps we need our TTY helpers to note the terminal row and height before setting up an alt tty, and when restoring, check if the height has changed if so move the cursor to the new height after restoring the old TTY.

@balupton balupton added this to the Share Launch [v2] milestone Jan 3, 2025
@balupton
Copy link
Member

balupton commented Jan 25, 2025

This is due to the ask command not clearing correctly, caused by these lines:
https://github.com/bevry/dorothy/blame/master/commands/ask#L380-L381

In what appears a refactoring regression within #254 and merged by c4d1e1f

As the ask output is not cleared, the cursor still moves, cursor becomes in-between data, and the ask prompt and result gets doubled. Hugely undesirable, and it is unfortunate that it has been an unreported bug since its merge on October 28th, 2024.

I was able to detect this is what is happening by spotting it occur when I was running setup-node on a new machine and noticed how the questions to fill in my npm profile data where behaving in a less desirable manner.

I will need to go through the commits of that PR and find out exactly how those lines ended up occurring. It looks as if they were probably two if statements then merged into a single one.

If anyone experiences something less than optimal or intuitive during any dorothy experience, please post a report and I will fix it ASAP.

@balupton balupton changed the title Bug: After specifying I want to use a GitHub Repo, the ask prompt is in-between data Bug: ask prompt is not clearing correctly, causing ask prompt and answer to duplicate and cursor to move in-between data Jan 25, 2025
@balupton balupton self-assigned this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken or unexpected
Development

Successfully merging a pull request may close this issue.

2 participants