Subject: bug#59686: 30.0.50; tree-sitter indentation in some loops and conditional statements is wrong

From: Yuan Fu <[email-masked]>
Date: Thu, 1 Dec 2022 21:13:42 -0800

Bruce Stephens <[email-masked]> writes:

> With the following file I would expect foo(i) to be indented to just two
> indents (like the first one), but they are not. Similarly for many other
> compound statements where the opening spans more than one line.
>
> // -*- c-ts -*-
> int main() {
>    for (int i=0; i<10; ++i) {
>      foo(i);
>    }
>
>    for (int i=0;
>           i<10;
>           ++i) {
>             foo(i);
>           }
> }

I see, that’s because the indent rule finds the BOL of the line where
the "{" is on, and indents from there.  Theo, WDYT? Does indent style 
fix this, or we should change the indent rules?

Yuan