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

Entering } when cursor is left of a } shouldn't overwrite it #45820

Closed
ramya-rao-a opened this issue Mar 15, 2018 · 3 comments
Closed

Entering } when cursor is left of a } shouldn't overwrite it #45820

ramya-rao-a opened this issue Mar 15, 2018 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-find Editor find operations

Comments

@ramya-rao-a
Copy link
Contributor

From @willfaught on March 7, 2018 7:52

Start with this:

{"SyntaxImag1", SyntaxImag("1i")},

Now, SyntaxImag changes from type SyntaxImag string to type SyntaxImag struct { Text string }, so you must update the code to this:

{"SyntaxImag1", &SyntaxImag{Text: "1i"}},

So, you insert the & and replace the ( with a {Text: . Now you have:

{"SyntaxImag1", &SyntaxImag{Text: "1i")},

Finally, you go to replace the ) with }, but you end up with:

{"SyntaxImag1", &SyntaxImag{Text: "1i"}, // Missing the outer }, because inserting the inner } overwrote the outer }

which is unexpected and invalid syntax.

Copied from original issue: microsoft/vscode-go#1563

@ramya-rao-a
Copy link
Contributor Author

This is not Go specific. I see this happening on ts files as well

@rebornix
Copy link
Member

rebornix commented Sep 5, 2018

Duplicate of #37315

@rebornix rebornix marked this as a duplicate of #37315 Sep 5, 2018
@rebornix rebornix added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 5, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 5, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Sep 5, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-find Editor find operations
Projects
None yet
Development

No branches or pull requests

3 participants