Vscode: generator method of class autocomplete causes star(*) to be added to next line

Created on 12 Feb 2018  路  11Comments  路  Source: microsoft/vscode

vscode

  • VSCode Version: 1.20.0
  • OS Version: macos 10.13.3

Steps to Reproduce:

  1. write one class
  2. add generator function


image

Does this issue occur when all extensions are disabled?: Yes

bug javascript typescript verified

Most helpful comment

@mjbvz do you hava time to fix it ? if you no plan to do, i can make a PR .

All 11 comments

I'm guessing this is JS, correct?

@octref yes

@limerickgds Did you find a workaround for this? It's really annoying

+1

keep watching

@mjbvz do you hava time to fix it ? if you no plan to do, i can make a PR .

+1

It took me a few tries, this only reproduces when indenting using spaces

e.g.

class A {
    * test() {
    }
}

@alexandrudima Sorry but this isn't fixed and is reproducible on the latest version for Mac. It does the exact same thing as the gif in the first post.

i add a onEnterRule rule that will only execute if the text above the this line matches /** or *.
but i don't think this is a good solution.

Is there a chance this still catches generator syntax? Is there a known workaround? It's not stopping development or anything. It's just a little irritating.

@matt-potts Please open a new issue, you might be running into a similar, but different issue. This works correctly for me:

43469-2

@alexandrudima I've resolved my issue. I went to start a new issue and noticed the advice to try the insider version. I noticed the problem was gone. I then looked at my version and I was on 1.23.1. I then noticed the latest was 1.28. Strangely, It said there was no update available for me. I downloaded the latest and reinstalled. The issue is now gone. Thanks for your help and thanks for putting in the recommendation for the insiders version.

Was this page helpful?
0 / 5 - 0 ratings