Skip to content

Commit

Permalink
fix: indent nested traces correctly
Browse files Browse the repository at this point in the history
Presumably this worked before due to extra `.group` nodes appearing. I think `group`s should be implied by the children of a trace node.

Not tested as I do not have a working setup for the latest Lean, though there is a test case at https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/trace.20nodes.20do.20not.20nest.20correctly.20in.20the.20infoview/near/487028252.
  • Loading branch information
eric-wieser authored Dec 9, 2024
1 parent 520d4b6 commit 926a76e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lean/Message.lean
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ partial def formatAux : NamingContext → Option MessageDataContext → MessageD
msg := f!"{msg} [{data.stopTime - data.startTime}]"
msg := f!"{msg} {(← formatAux nCtx ctx header).nest 2}"
let children ← children.mapM (formatAux nCtx ctx)
return .nest 2 (.joinSep (msg::children.toList) "\n")
return .nest 2 (.group <| .joinSep (msg::children.toList) "\n")
| nCtx, ctx?, ofLazy pp _ => do
let dyn ← pp (ctx?.map (mkPPContext nCtx))
let some msg := dyn.get? MessageData
Expand Down

0 comments on commit 926a76e

Please sign in to comment.