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

Editor indentation incorrect around tabbed function parameters #35952

Closed
aahaselgrove opened this issue Oct 10, 2017 · 4 comments
Closed

Editor indentation incorrect around tabbed function parameters #35952

aahaselgrove opened this issue Oct 10, 2017 · 4 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-autoindent Editor auto indentation issues

Comments

@aahaselgrove
Copy link

Indentation does not seem to work correctly for multi-line function signatures. It is based off the indentation on the previous line, rather than the appropriate scope (which in this case, is the indentation level of the first line of the function).

Outcome after typing the following, and pressing enter between the braces. '|' represents the cursor position.

Expected:

void test(int first, int second,
        int third) {
    |
}

void test2(int first, int second,
           int third) {
    |
}

Actual:

void test(int first, int second,
        int third) {
        |
    }

void test2(int first, int second,
           int third) {
               |
           }
@vscodebot vscodebot bot added the editor label Oct 10, 2017
@aahaselgrove
Copy link
Author

This might be related to #35709

@sean-mcmanus
Copy link
Contributor

This repros without the cpptools extension installed, but it looks like our extension may be responsible for handling the C++ indentation rules. We're tracking this issue with microsoft/vscode-cpptools#883 .

@alexdima alexdima added the editor-autoindent Editor auto indentation issues label Oct 26, 2017
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Nov 16, 2017
@alexdima alexdima removed the editor label Nov 23, 2017
@rebornix
Copy link
Member

This issue shares the same root cause as #30859 , let's track it there.

@rebornix rebornix added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 19, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 19, 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 19, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 4, 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-autoindent Editor auto indentation issues
Projects
None yet
Development

No branches or pull requests

5 participants
@rebornix @aahaselgrove @alexdima @sean-mcmanus and others