Skip to content

SortVariables inserts unexpected line breaks in multi-variable declarations #680

Description

@GOB-Andrea

Hello,
we activated "SortVariables" in codeActionsOnSave and and noticed a strange behavior:

Image

When saving, the variables are automatically sorted. But in addition, several line breaks are inserted into the variable declaration:

IsA, IsB, IsC: Boolean;
IsD: Boolean;

is changed into:

IsA,
IsB,
IsC: Boolean;
IsD: Boolean;

In addition we noticed: if we add IsD to the declaration above (IsA, IsB, IsC, IsD: Boolean) then no line break is added during the saving process.

If we disable the automatic code action and perform the code action manually, the variable declaration will not be split into multiple lines.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions