Justify header when there are decorations but no grid
commit2ea3758c4b9cfdfce3612dc4fd425b785c8942e1
authorEzinwa Okpoechi <brainmaestro@outlook.com>
dateThu 24 May 2018, 11:47 (8 years ago)
parent65bb4c7
src/printer.rs+2
@@ -90,6 +90,8 @@ impl<'a> Printer<'a> {
9090 .grid
9191 .paint(if self.panel_width > 0 { "│" } else { "" }),
9292 )?;
93+ } else {
94+ write!(self.handle, "{}", " ".repeat(self.panel_width))?;
9395 }
9496
9597 writeln!(
tests/snapshots/output/changes,header,numbers.snapshot.txt+1−1
@@ -1,4 +1,4 @@
1−File: sample.rs
1+ File: sample.rs
22 1 struct Rectangle {
33 2 width: u32,
44 3 height: u32,
tests/snapshots/output/changes,header.snapshot.txt+1−1
@@ -1,4 +1,4 @@
1−File: sample.rs
1+ File: sample.rs
22 struct Rectangle {
33 width: u32,
44 height: u32,
tests/snapshots/output/header,numbers.snapshot.txt+1−1
@@ -1,4 +1,4 @@
1−File: sample.rs
1+ File: sample.rs
22 1 struct Rectangle {
33 2 width: u32,
44 3 height: u32,