Don't wrap argument list containing anonymous functions
Just like for objects and lambdas, don't consider line breaks inside anonymous functions as line breaks inside argument list
This commit is contained in:
@@ -581,6 +581,13 @@ private fun excludeLambdasAndObjects(parent: ASTBlock): List<TextRange> {
|
||||
super.visitObjectLiteralExpression(expression)
|
||||
rangesToExclude.add(expression.textRange)
|
||||
}
|
||||
|
||||
override fun visitNamedFunction(function: KtNamedFunction) {
|
||||
super.visitNamedFunction(function)
|
||||
if (function.name == null) {
|
||||
rangesToExclude.add(function.textRange)
|
||||
}
|
||||
}
|
||||
})
|
||||
return TextRangeUtil.excludeRanges(parent.textRange, rangesToExclude).toList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user