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

Typing "/**/" should work #54499

Closed
ghost opened this issue Jul 17, 2018 · 3 comments
Closed

Typing "/**/" should work #54499

ghost opened this issue Jul 17, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s)

Comments

@ghost
Copy link

ghost commented Jul 17, 2018

Issue Type: Bug

When I type ", [, (, or { it is automatically matched with ", ], ), or }. But typing "" or () will work by consuming the automatic match, so I don't end up with ()).
When I type /**/ I would expect that to be exactly the text I get, but instead I get /**/ */.

@vscodebot vscodebot bot added the editor label Jul 17, 2018
@mjbvz mjbvz self-assigned this Jul 17, 2018
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Jul 28, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 28, 2018

@rebornix @alexandrudima This is because we expand /*| to /**| */. Is there any way to tell VS Code to eat the next / that the user types, like we for for ) when completing ()?

@alexdima
Copy link
Member

@mjbvz I don't believe it is the same case as a single character expansion.

We expand /**| to /**| */, i.e. we append */ after the cursor.

kapture 2018-07-30 at 15 06 04

It is not clear to me how to possibly recover if the user meant to type literally and empty comment: /**/.

Perhaps we should not expand /**| to /**| */ as it is not 100% clear a JSDoc will follow. Perhaps we should do the smart things when pressing Enter, as that more clearly indicates a JSDoc comment.

@rebornix rebornix removed their assignment Sep 13, 2018
@alexdima
Copy link
Member

Let's track in #1966

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 17, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants