From 9fc590aba7097eddf4ccef91eca211b3f77f9e7f Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Sun, 14 Sep 2025 17:08:26 +0200 Subject: [PATCH] Use fmt width if specified in graphical report handler --- src/handlers/graphical.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/handlers/graphical.rs b/src/handlers/graphical.rs index faac695..60efeed 100644 --- a/src/handlers/graphical.rs +++ b/src/handlers/graphical.rs @@ -1366,7 +1366,13 @@ impl ReportHandler for GraphicalReportHandler { return fmt::Debug::fmt(diagnostic, f); } - self.render_report(f, diagnostic) + if let Some(width) = f.width() { + let mut handler = self.clone(); + handler.termwidth = width; + handler.render_report(f, diagnostic) + } else { + self.render_report(f, diagnostic) + } } }