better-cpp-syntax icon indicating copy to clipboard operation
better-cpp-syntax copied to clipboard

field index followed by arrow operator

Open laurentlb opened this issue 1 year ago • 1 comments

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

laurentlb avatar May 03 '23 11:05 laurentlb

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.

jeff-hykin avatar May 16 '23 21:05 jeff-hykin