1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Introjucer: another code indent fix.

This commit is contained in:
jules 2012-09-04 15:26:22 +01:00
parent 842d30fbfa
commit 629007c219

View file

@ -447,6 +447,7 @@ namespace CodeHelpers
String& blockIndent, String& lastLineIndent)
{
int braceCount = 0;
bool indentFound = false;
while (pos.getLineNumber() > 0)
{
@ -460,14 +461,17 @@ namespace CodeHelpers
if (braceCount > 0)
{
blockIndent = getLeadingWhitespace (line);
if (lastLineIndent.isEmpty())
if (! indentFound)
lastLineIndent = blockIndent + tab;
return true;
}
if (lastLineIndent.isEmpty() && trimmedLine.isNotEmpty())
if ((! indentFound) && trimmedLine.isNotEmpty())
{
indentFound = true;
lastLineIndent = getLeadingWhitespace (line);
}
}
return false;