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:
parent
842d30fbfa
commit
629007c219
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue