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

When typing a 2nd single quote, the quote gets doubled #11222

Closed
elgwiedo opened this issue Aug 30, 2016 · 7 comments
Closed

When typing a 2nd single quote, the quote gets doubled #11222

elgwiedo opened this issue Aug 30, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) editor-autoclosing Editor automatic closing of parens / brackets / etc. javascript JavaScript support issues
Milestone

Comments

@elgwiedo
Copy link

  • VSCode Version: Code 1.4.0 (6276dcb, 2016-08-04T16:45:31.680Z)
  • OS Version: Windows_NT ia32 6.1.7601

Steps to Reproduce:

  1. Write a function that has an object as argument (function (myobject) .... )
  2. Now you decide to pass a string as a parameter. Type a first single quote to define the argument that is passed as string (function (**'**myobject) ... )
  3. Type the second quote to close the string. (function ('myobject**') ... )
    Now you get (function ('myobject
    ''**) ... )
@dbaeumer
Copy link
Member

@alexandrudima assigning to you. If this is something JS/TS can control please assign back to me.

@alexdima alexdima assigned joaomoreno and unassigned alexdima Aug 30, 2016
@joaomoreno joaomoreno added the editor-bracket-matching Editor brace matching label Aug 31, 2016
@joaomoreno joaomoreno added this to the Backlog milestone Aug 31, 2016
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Aug 31, 2016
@rmunn
Copy link
Contributor

rmunn commented Sep 1, 2016

Probably related to #8539 and/or #8850.

@mjbvz mjbvz added the javascript JavaScript support issues label Dec 2, 2016
@Srekel
Copy link

Srekel commented Mar 2, 2017

In addition to the specific bug OP noted, when you delete the first one, both gets deleted. This is quite annoying :D See gif:

codebug_quotes

@rebornix
Copy link
Member

It shares the same story as #13523 , we don't do any bracket matching check while typing as the cost is pretty high.

@rebornix
Copy link
Member

From @octref Don't provide closing paren if there are unmatched closed parens

  • VSCode Version: 1.6

Steps to Reproduce:

Type ( before ), end up with ())
Type { before }, end up with {}}

@alexdima alexdima added editor-autoclosing Editor automatic closing of parens / brackets / etc. and removed editor-bracket-matching Editor brace matching labels Oct 20, 2017
@joaomoreno joaomoreno assigned rebornix and unassigned joaomoreno Nov 23, 2017
@alexdima alexdima removed the editor label Nov 23, 2017
@rebornix
Copy link
Member

rebornix commented Sep 5, 2018

The root cause for this issue is our auto closing feature doesn't take language semantics into account. Let's track this issue in #6841 which is the earliest issue. Thanks for your feedback!

@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 20, 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) editor-autoclosing Editor automatic closing of parens / brackets / etc. javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

8 participants