Created
December 17, 2013 18:04
-
-
Save PilzAdam/8009690 to your computer and use it in GitHub Desktop.
Patch for Astyle 2.04 to use 2 tabs for indentation of broken lines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/astyle.orig/src/ASBeautifier.cpp b/astyle/src/ASBeautifier.cpp | |
index 7a5607a..f492aa8 100755 | |
--- a/astyle.orig/src/ASBeautifier.cpp | |
+++ b/astyle/src/ASBeautifier.cpp | |
@@ -1137,20 +1137,12 @@ void ASBeautifier::registerInStatementIndent(const string &line, int i, int spac | |
tabIncrement += convertTabToSpaces(j, tabIncrement); | |
} | |
- inStatementIndent = i + nextNonWSChar + spaceTabCount_ + tabIncrement; | |
+ inStatementIndent = indentLength * 2; | |
// check for run-in statement | |
if (i > 0 && line[0] == '{') | |
inStatementIndent -= indentLength; | |
- if (inStatementIndent < minIndent) | |
- inStatementIndent = minIndent + spaceTabCount_; | |
- | |
- // this is not done for an in-statement array | |
- if (inStatementIndent > maxInStatementIndent | |
- && !(prevNonLegalCh == '=' && currentNonLegalCh == '{')) | |
- inStatementIndent = indentLength * 2 + spaceTabCount_; | |
- | |
if (!inStatementIndentStack->empty() && | |
inStatementIndent < inStatementIndentStack->back()) | |
inStatementIndent = inStatementIndentStack->back(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment