travisjeffery / ClangFormat-Xcode

Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
https://twitter.com/travisjeffery
MIT License
2.89k stars 288 forks source link

Fixed the problem where indentation is reset to zero when formatting a selected range that have non-zero indentation. #71

Closed yixiang closed 9 years ago

yixiang commented 9 years ago

Fixed Issue #69: indentation is reset to zero when formatting a selected range that have non-zero indentation.

tonyarnold commented 9 years ago

I've been testing this locally, and while the formatting is now correct, the selection that's restored after a successful format is wrong.

Selection before formatting:

Selection before formatting

Selection after formatting:

Selection after formatting