FIXED WEB-22003 Function Body is Indented Wrong

This commit is contained in:
Rustam Vishnyakov
2016-06-16 16:38:49 +03:00
parent f320c3ef4a
commit 0655318f39
@@ -166,7 +166,7 @@ public abstract class JavaLikeLangLineIndentProvider extends FormatterBasedLineI
}
while (!position.isAtEnd()) {
if (currLanguage == Language.ANY || currLanguage == null) currLanguage = position.getLanguage();
if (position.isAtAnyOf(Semicolon, BlockOpeningBrace, BlockClosingBrace, BlockComment, DocBlockEnd, LineComment) ||
if (position.isAtAnyOf(Semicolon, BlockOpeningBrace, BlockClosingBrace, BlockComment, DocBlockEnd, LineComment, LeftParenthesis) ||
(position.getLanguage() != Language.ANY) && !position.isAtLanguage(currLanguage)) {
SemanticEditorPosition statementStart = getPosition(position.getEditor(), position.getStartOffset());
if (!statementStart.after().afterOptional(Whitespace).isAtEnd()) {