fortinmike / XcodeBoost

An Xcode plugin that aims to make altering and inspecting code quick and easy.
MIT License
817 stars 86 forks source link

"Select Method and Function Signatures" also selects if, switch, for #36

Open iv-mexx opened 9 years ago

iv-mexx commented 9 years ago

I was testing out the functions of this plugin, had the whole content of some file selected and tried the Select Method and Function Signatures action.

A few lines were selected unexpectedly.

In this sample, the line if(self) is also selected:

-(instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if(self) {
        ...
    }
    return self;
}

In this sample, the line switch(interfaceOrientation) is also selected:

-(AVCaptureVideoOrientation)AVOrientationFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    switch(interfaceOrientation) {
        case UIInterfaceOrientationPortrait:
            ...
    }
}

I've noticed that in the .gif in the Readme, the code formatting is different: There, there's always spaces between the keywords and the opening parenthesis while there are no spaces in my samples.

fortinmike commented 9 years ago

Thanks for reporting this, I'll take a look when I get the time.