mirror of https://github.com/zkat/miette.git
Use fmt width if specified in graphical report handler
This commit is contained in:
parent
907857058d
commit
9fc590aba7
|
|
@ -1366,7 +1366,13 @@ impl ReportHandler for GraphicalReportHandler {
|
||||||
return fmt::Debug::fmt(diagnostic, f);
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue