Revert nested indentation

This commit is contained in:
Eugen Wissner 2022-06-08 11:06:43 +02:00
parent 35cf805237
commit 42bb512d93
No known key found for this signature in database
GPG Key ID: A27FDC1E8EE902C0
5 changed files with 60 additions and 1 deletions

View File

@ -702,8 +702,11 @@ private:
void revertParenIndentation() void revertParenIndentation()
{ {
if (parenDepthOnLine) if (parenDepthOnLine)
{
foreach (i; 0 .. parenDepthOnLine)
{ {
indents.pop(); indents.pop();
}
indents.popTempIndents(); indents.popTempIndents();
} }
parenDepthOnLine = 0; parenDepthOnLine = 0;

View File

@ -36,4 +36,19 @@ void f()
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [ send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [
])); ]));
} }
foreach (x; map([
1,
2,
3,
]))
{
}
foreach (x; foo!(map!([
1,
2,
3,
])))
{
}
} }

View File

@ -35,4 +35,19 @@ void f()
{ {
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [])); send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, []));
} }
foreach (x; map([
1,
2,
3,
]))
{
}
foreach (x; foo!(map!([
1,
2,
3,
])))
{
}
} }

View File

@ -31,4 +31,17 @@ void f()
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [ send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [
])); ]));
} }
foreach (x; map([
1,
2,
3,
])) {
}
foreach (x; foo!(map!([
1,
2,
3,
]))) {
}
} }

View File

@ -30,4 +30,17 @@ void f() {
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [ send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [
])); ]));
} }
foreach (x; map([
1,
2,
3,
])) {
}
foreach (x; foo!(map!([
1,
2,
3,
]))) {
}
} }