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

Incorrect format on paste for blank line inside js function #29896

Closed
mjbvz opened this issue Jun 29, 2017 · 1 comment
Closed

Incorrect format on paste for blank line inside js function #29896

mjbvz opened this issue Jun 29, 2017 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues javascript JavaScript support issues

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 29, 2017

  • VSCode Version: Code - Insiders 1.14.0-insider (9541932, 2017-06-29T05:07:31.424Z)
  • OS Version: Darwin x64 16.6.0

Steps to Reproduce:

  1. Enable format on paste
  2. Copy the js code:
function abc() {

}
abc

note that the blank line has no whitespace on it. It is empty

  1. Paste the code into a blank js file

Expected
Retained formatting:

function abc() {

}
abc

Actual
Code is indented

function abc() {
  
  }
  abc
@mjbvz mjbvz added editor-autoindent Editor auto indentation issues javascript JavaScript support issues labels Jun 29, 2017
@vscodebot vscodebot bot added the insiders label Jun 29, 2017
@chrmarti chrmarti removed the insiders label Sep 27, 2017
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Nov 14, 2017
rebornix added a commit that referenced this issue Nov 28, 2017
@rebornix
Copy link
Member

#36294, #29896, #38833 share the same root cause: empty lines are not handled gracefully. I pushed a fix which makes this specific case work but it may not work for all cases ;)

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 12, 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 editor-autoindent Editor auto indentation issues javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

3 participants