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

Fix UI glitches and do not pre-write the answer to questions with the default anwser #6290

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Member

Queued on top of #6289
This implements what was described in #6289 (review) with the addition of a UI bugfix:

$ opam pin edit ppxlib
Package ppxlib is not pinned. Edit as a new pinning to version 0.33.1~5.3preview? [y/n] y
Press enter to start "vim" (this can be customised by setting EDITOR or OPAMEDITOR)...[WARNING] The opam file didn't pass validation:
  warning 59: url doesn't contain a checksum
Proceed anyway ('no' will re-edit)? [y/n] 

In this example you can see the Press enter ... line is missing the end of line character. This happens because OpamConsole.pause (used to write this line) uses short_user_input with ~default:"", but this function wasn't made to have its default be anything but a string of length 1 in interactive mode. This is marked evident as the prompt subfunction will move the cursor left then remove one character, which happens to be the issue here.

@kit-ty-kate kit-ty-kate added this to the 2.4.0~alpha1 milestone Nov 11, 2024
@rjbou rjbou self-requested a review November 12, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants