Skip to content

vim: Fix indentation at global scope after non-semantic ([{/)]} #13925

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

Merged
merged 1 commit into from
May 6, 2014

Conversation

lilyball
Copy link
Contributor

@lilyball lilyball commented May 4, 2014

If an unbalanced [ exists in a string or comment, this should not be
considered when calculating the indent at the top level.

Similarly, when testing for ({/}) to see if we're at the top level to
begin with, strings and comments should be skipped.

@lilyball
Copy link
Contributor Author

lilyball commented May 4, 2014

cc @chris-morgan

If an unbalanced [ exists in a string or comment, this should not be
considered when calculating the indent at the top level.

Similarly, when testing for ({/}) to see if we're at the top level to
begin with, strings and comments should be skipped.
@lilyball
Copy link
Contributor Author

lilyball commented May 5, 2014

r? @thestinger

I had to tweak it, turns out the other searchpair() call can benefit from this same thing. I skipped it before because I wasn't sure if it was necessary, but I found a reproduction case inside of str.rs,

@lilyball lilyball changed the title vim: Fix indentation at global scope after non-semantic [ vim: Fix indentation at global scope after non-semantic ([{/)]} May 5, 2014
bors added a commit that referenced this pull request May 6, 2014
…nger

If an unbalanced [ exists in a string or comment, this should not be
considered when calculating the indent at the top level.

Similarly, when testing for ({/}) to see if we're at the top level to
begin with, strings and comments should be skipped.
@bors bors closed this May 6, 2014
@bors bors merged commit 91e61ad into rust-lang:master May 6, 2014
@lilyball lilyball deleted the vim_indent_bracket_fix branch May 6, 2014 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants