AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.08k stars 351 forks source link

Fix re-rendering when prompt is exactly the width of the terminal #321

Closed mislav closed 3 years ago

mislav commented 3 years ago

The code that measures width of rendered lines of content and whether any have overflown in the terminal did not account for the possibility that the content could be exactly the width of the terminal. In that case, it shouldn't be counted as overflow.

Fixes #318 Followup to #291, #288

AlecAivazis commented 3 years ago

Thanks for fixing this @mislav - i verified the behavior on both apple and windows.

Thanks for being patient while we wrangle this! Maintaining this project alone takes a lot of time and attention, two things i haven't had much of in the past month.

AlecAivazis commented 3 years ago

On that note, are there any extra resources at GitHub that can help me test PRs and releases? There have been two regressions in the past month that are mostly due to me juggling multiple things at once, i would like to find a way to make sure that doesn't happen again

mislav commented 3 years ago

@AlecAivazis Sure, let us know how we can help. We are just 3 devs and don't have infinite resources either, but we rely quite a lot on Survey and we'd like to have it be stable. A lot of problems that our users reported with GitHub CLI were fixed over the last few releases of Survey, and we appreciate that!

We are also wondering whether you would be open to contributions that improve accessibility by positioning the cursor at the right place, and possibly allowing custom keybindings to Prompt components like the Editor.

mislav commented 3 years ago

BTW, thank you for making a patch release in such a short time! 🙇 ❤️