Index: lib/src/source_visitor.dart |
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart |
index dbeb1fd87c861df6ebd6058cde43e8269a9ad5c3..42897b8666cf8d5e514774d1ad2e01af17a23314 100644 |
--- a/lib/src/source_visitor.dart |
+++ b/lib/src/source_visitor.dart |
@@ -849,6 +849,9 @@ class SourceVisitor implements AstVisitor { |
// as the rest of the loop clauses. |
builder.indent(Indent.loopVariable); |
+ // Allow the variables to stay unsplit even if the clauses split. |
+ builder.startRule(); |
+ |
var declaration = node.variables; |
visitDeclarationMetadata(declaration.metadata); |
modifier(declaration.keyword); |
@@ -858,6 +861,7 @@ class SourceVisitor implements AstVisitor { |
split(); |
}); |
+ builder.endRule(); |
builder.unindent(); |
} |
@@ -871,7 +875,13 @@ class SourceVisitor implements AstVisitor { |
// The update clause. |
if (node.updaters.isNotEmpty) { |
split(); |
+ |
+ // Allow the updates to stay unsplit even if the clauses split. |
+ builder.startRule(); |
+ |
visitCommaSeparatedNodes(node.updaters, between: split); |
+ |
+ builder.endRule(); |
} |
token(node.rightParenthesis); |