wxUiEditor icon indicating copy to clipboard operation
wxUiEditor copied to clipboard

Allow indentation in lambda functions

Open KeyWorksRW opened this issue 1 year ago • 0 comments

Description:

We remove leading spaces in lambda functions, however that doesn't allow for indentation. It would make more sense to parse all the lines and see if there is consistent indentation at the beginning of each line, and then only remove that much indentaion. E.g.

    auto name = m_combo_function->GetValue();
    if (name.size())
        name += ", ";
    name += "tt_string str";
    m_combo_function->SetValue(name);

In the above code, there is a consistent 4 spaces at the beginning of each line that should be removed. However, the additional 4 spaces used to inden name += ", "; should not be removed.

KeyWorksRW avatar May 28 '23 13:05 KeyWorksRW