swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
370 stars 47 forks source link

iMenu doesn't find declarations unless the opening brace of the containing top-level entity is on the same line #173

Closed Mike-Woolley closed 2 years ago

Mike-Woolley commented 2 years ago

Consider this simple code fragment:

class Class1
{
    func fun1 () {}
    func fun2 () {}
}

class Class2
{
    func fun1 () {}
    func fun2 () {}
}

iMenu only shows the top-level entities:

image

However, putting the { on the same line as the class names makes it work as expected:

class Class1 {
    func fun1 () {}
    func fun2 () {}
}

class Class2 {
    func fun1 () {}
    func fun2 () {}
}

image

It would be nice if this could be fixed, as Xcode copes with either version correctly 😄

image

Thanks, Mike

taku0 commented 2 years ago

Thank you for reporting. This is a bug. I will fix it on the next weekend.

Mike-Woolley commented 2 years ago

Great thanks!

I can help test when you have a fix.

Thanks, Mike

On 6 Oct 2021, at 15:11, taku0 @.***> wrote:

 Thank you for reporting. This is a bug. I will fix it on the next weekend.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

taku0 commented 2 years ago

Fixed.

Mike-Woolley commented 2 years ago

Looks good 😄

Thanks for fixing it so quickly! Mike