swift-emacs / swift-mode

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

Fix inner scope guard indent #188

Closed nhojb closed 10 months ago

nhojb commented 10 months ago

Commit 25e41ed broken indentation of guard statements when nested within an inner scope. It's been bugging me for a while 😄

This PR fixes the indentation.

Before:

func main() {
    guard foo else {
    // wrong indentation
    }
}

After:

func main() {
    guard foo else {
        // correct indentation
    }
}
taku0 commented 10 months ago

LGTM. Thank you!