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

field index followed by arrow operator #634

Open
laurentlb opened this issue May 3, 2023 · 1 comment
Open

field index followed by arrow operator #634

laurentlb opened this issue May 3, 2023 · 1 comment

Comments

@laurentlb
Copy link

Tested on vscode.dev

The code with a problem is:

int main() {
    a_long_variable_name
        [field_index] +=
        some_object->field;

    random_cpp_code(with_bad_highlighting);
}

It looks like:

image
Notice that the last line has incorrect highlighting.

It should look like:

Removing a line return fixes the highlighting:
image

@jeff-hykin
Copy link
Owner

jeff-hykin commented May 16, 2023

once the brackets are on a newline, the syntax is recognizing them as the beginning of a lambda. Sadly because textmate can only look at one line at a time, this is going to be really tough to fully fix.

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

No branches or pull requests

2 participants