bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61026: 29.0.60; c-ts-mode: Broken indentation for loops and conditio


From: Theodor Thornhill
Subject: bug#61026: 29.0.60; c-ts-mode: Broken indentation for loops and conditions without brace
Date: Wed, 25 Jan 2023 21:21:27 +0100

Mohammed Sadiq <sadiq@sadiqpk.org> writes:

> The following code has broken indentation with c-ts-mode:
>
>   while (true)
>     if (true) {
>     puts ("Hello");
>   }
>
>   if (true)
>     if (true)
>       {
>       puts ("World");
>     }
>
> For which, I expect to get the following indentation (with default config):
>
>   while (true)
>     if (true) {
>       puts ("Hello");
>     }
>
>   if (true)
>     if (true)
>       {
>         puts ("World");
>       }
>
>

Thanks, Mohammed!

Yuan, I'm not sure the new brace counting method is a good enough
improvement just yet considering its complexity and the number of issues
we are seeing.  Do you see any simple fixes for these issues?

I can try to debug this this weekend, but not sure I really have time to
fix it.  All of these issues work fine in js-ts-mode or java-ts-mode, if
I'm not mistaken.

Theo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]