gh-copilot icon indicating copy to clipboard operation
gh-copilot copied to clipboard

Bug: Spamming arrow keys while prompting causes a crash

Open asportnoy opened this issue 2 years ago • 3 comments

What happened?

While it's running, pressing arrow keys causes the prompt to glitch out and error, along with a bunch of gibberish control character output.

https://github.com/github/gh-copilot/assets/14863373/130b1818-82a4-4da2-8a2d-cc0de18d1a32

Versions

v0.5.2-beta

Relevant terminal output

See video above

asportnoy avatar Nov 08 '23 17:11 asportnoy

@asportnoy : Thanks for opening up this issue and being an early adopter! 🙇 I won't lie, my first thought was "Yeah, my cat likes to help as a copilot, too!" when I saw this. 🤣

All of that aside, I think there is something deeper in the prompter library we use — go-survey/survey — when the extension is loading up. I was able to reproduce this locally — thanks for the video! — so can follow up on what is happening and what can be done about it.

andyfeller avatar Nov 08 '23 18:11 andyfeller

For me the arrow keys do not crash it but Option + arrow keys do.

asmeurer avatar Nov 08 '23 21:11 asmeurer

@asportnoy @asmeurer : Thank you for your patience on delayed follow up with holiday! The team has been able to reproduce this behavior thanks to the above recording 👍.

Aside from confirming in https://github.com/github/gh-copilot/issues/3#issuecomment-1802431493 where the issue is, efforts to work around it haven't been effective. There's been discussions about replacing that dependency, which might give us options in the future. However for now, I think this will remain open a little bit until we can prioritize this along with the other enhancements being planned. 🙇

andyfeller avatar Dec 01 '23 19:12 andyfeller