[go: up one dir, main page]

Skip to content

Doubled "continuation indent" after certain operators

Hello, I am interesting in updating from version 3.1 to the latest (currently 3.6.4). I am encountering a few problematic differences in behavior; this issue is about one of them. Thanks in advance!

I am seeing that the "continuation indent" is using twice the value of --indent=tab=# when it follows certain operators, such as +=. However, after others, such as =, it seems to work fine. Here is my test case:

Input file test.cpp:

a =
b;
a +=
b;

Output of astyle --style=allman --indent=tab=4 test.cpp (note 8 spaces after +=):

a =
    b;
a +=
        b;

Output of astyle --style=allman --indent=tab=8 test.cpp (note 16 spaces after +=):

a =
        b;
a +=
                b;

Output of astyle --style=allman --indent=tab=4 --indent-continuation=3 test.cpp (note 8*3=24 spaces after +=):

a =
            b;
a +=
                        b;

Output of astyle --style=allman --indent=tab=8 --indent-continuation=2 test.cpp (note 16*2=32 spaces after +=):

a =
                b;
a +=
                                b;
Edited by ds614