Skip to content

Switch cases expand in wrong position #19

@revolter

Description

@revolter

I have this enum:

typedef NS_ENUM(NSUInteger, PushDirection) {
    PushDirectionUpwards,
    PushDirectionDownwards
};

and this method:

- (void)pushItem:(id <UIDynamicItem>)item withDirection:(PushDirection)direction andSpeed:(PushSpeed)speed

and this method body:

switch (dir) {
}

and upon completing the variable name and pressing Enter I get this:

    switch (direction) {

    }
case PushDirectionUpwards: {
    <#statement#>
    break;
}
case PushDirectionDownwards: {
    <#statement#>
    break;
}
default: {
    break;
}

inside the method.

Also, if I have some code after the switch like:

switch (dir) {

}

// example comment
NSInteger exampleCode;

I get this after the expand:

    switch (direction) {

    }

    // example comment
    NSInteger exampleCode;
case PushDirectionUpwards: {
    <#statement#>
    break;
}
case PushDirectionDownwards: {
    <#statement#>
    break;
}
default: {
    break;
}

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