Copilot removes closing brackets #134879
Replies: 2 comments
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Here's another example: Before accepting the suggestion: After accepting the suggestion: note that the closing parenthesis for function Here's another screenshot after having pressed |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
In all code examples below, my current typing cursor is expressed with a pipe character (
|
).Let's say I'm writing unit tests, and I type this:
Because I have auto-closing brackets enabled (and this is a good thing; I would never want that turned off; please don't tell me to turn it off), at this point, my editor would actually contain this:
So far, so good. Everything makes sense. So Copilot would suggest a value for my property. Let's say it's:
initial value for event
. Then I accept that value. Now my code looks like this:Or this:
I've lost some closing brackets. The number of lost layers of closing brackets varies from time to time (probably depending on how much I've moved in the code prior to typing the current line, which may remove some brackets from "auto-added context") , but it happens anytime I'm still in the context of typing something and there are still closing brackets/parentheses/etc. that were auto-added by the IDE. If I move my cursor elsewhere in the code, write more code, and put my cursor back inside
fakeThis
and ask Copilot for a suggestion, then usually it WON'T break any more brackets.The issue has been present for as long as I've used Copilot, and I get complaints from team members left and right asking whether I know how to fix this. And I don't.
System information
Beta Was this translation helpful? Give feedback.
All reactions