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

Remove bug adding a closing parenthesis/bracket/etc. when it is typed and next character is that type of parenthesis/bracket/etc. #78988

Closed
adrianme213 opened this issue Aug 12, 2019 · 9 comments
Assignees
Labels
editor-autoclosing Editor automatic closing of parens / brackets / etc. info-needed Issue requires more information from poster

Comments

@adrianme213
Copy link

Issue Type: Bug

Prior to the latest update, I could open a new pair of parentheses, type inside, and then hit the closing parenthesis when I was finished and I would "jump over" the closing parenthesis. With this update, I add another closing bracket instead.

Steps to recreate:

  1. In editor, create a function.
  2. Type a parameter inside the function parentheses
  3. Type a closing parenthesis

At this point, two closing parentheses should exist whereas before this last update this did not happen.

VS Code version: Code 1.37.0 (036a6b1, 2019-08-08T01:22:37.660Z)
OS version: Darwin x64 18.2.0

Extensions (5)
Extension Author (truncated) Version
bracket-pair-colorizer Coe 1.0.61
es7-react-js-snippets dsz 2.4.0
gitlens eam 9.9.3
beautify Hoo 1.5.0
atom-keybindings ms- 3.0.6

(1 theme extensions excluded)

@vscodebot
Copy link

vscodebot bot commented Aug 12, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@gjsjohnmurray
Copy link
Contributor

Can you reproduce this with all your extensions disabled? There was a change in this area in 1.37, trying to make VS Code do a better job. I guess it's possible one of your extensions is interacting badly with that change.

@adrianme213
Copy link
Author

Hi @gjsjohnmurray - I disabled all extensions and the error was still reproduced.

@vscodebot vscodebot bot removed the new release label Aug 13, 2019
@gjsjohnmurray
Copy link
Contributor

@adrianme213 can you post a screen recording? Even better if you first issue the Developer: Toggle Screencast Mode command so it shows your exact keystrokes.

@gjsjohnmurray
Copy link
Contributor

Also see #78902, of which this may be a duplicate.

@alexdima
Copy link
Member

@adrianme213

What programming language are you using? Here I am trying what you describe in JavaScript and the closing ) gets overtyped for me.

auto-closing-3

As @gjsjohnmurray mentions, we have made some changes to the overtyping in 1.38 (mainly to make the editor overtype only those characters inserted automatically and not others) and I would like to find out if you are hitting some corner case or if you would simply want the old behavior.

@alexdima alexdima added editor-autoclosing Editor automatic closing of parens / brackets / etc. info-needed Issue requires more information from poster labels Aug 13, 2019
@adrianme213
Copy link
Author

adrianme213 commented Aug 13, 2019

@alexandrudima @gjsjohnmurray
Using JavaScript as well. I referenced the other issue and the problems I'm having are related to @alexandrudima's two examples - when you leave the (...) area. If my memory is right, I believe this used to work in the past even when leaving the (...) area.
*Sorry for the 🗑 GIF quality. I used a converter
overtypedAfterExitParens

@gjsjohnmurray
Copy link
Contributor

@adrianme213 thanks for the recording. AFAIK what you're seeing is the expected new 1.37 behaviour. It fixes the issue described by the OP of #37315.

Other than muscle memory, any reason why you type the closing paren after inserting the third parameter?

@adrianme213
Copy link
Author

@gjsjohnmurray - thanks for the update and the reference. I identify with the #37315 people vocalizing about muscle memory and speed, but understand the new behavior and why it makes sense given autoclosing bracket inserts. Thank you again.

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-autoclosing Editor automatic closing of parens / brackets / etc. info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants