mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:34 +00:00
Adjust spaces on empty lines
This commit is contained in:
1 parent
ec61c2a789
commit
7de17c4f35
1 file changed
+4
-2
+4
-2
@@ -339,7 +339,7 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
|||||||
|
|
||||||
fn panel_sz(&self) -> usize {
|
fn panel_sz(&self) -> usize {
|
||||||
// add one to include the trailing space of a group
|
// add one to include the trailing space of a group
|
||||||
let group_sz = 2 * self.group_bytes as usize + 1;
|
let group_sz = self.base_digits as usize * self.group_bytes as usize + 1;
|
||||||
let group_per_panel = 8 / self.group_bytes as usize;
|
let group_per_panel = 8 / self.group_bytes as usize;
|
||||||
// add one to include the leading space
|
// add one to include the leading space
|
||||||
1 + group_sz * group_per_panel
|
1 + group_sz * group_per_panel
|
||||||
@@ -514,7 +514,9 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
|||||||
self.writer.write_all(b" ")?;
|
self.writer.write_all(b" ")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.writer.write_all(b" ")?;
|
for _ in 0..self.base_digits {
|
||||||
|
self.writer.write_all(b" ")?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Squeezer::Delete => self.writer.write_all(b" ")?,
|
Squeezer::Delete => self.writer.write_all(b" ")?,
|
||||||
Squeezer::Ignore | Squeezer::Disabled => {
|
Squeezer::Ignore | Squeezer::Disabled => {
|
||||||
|
|||||||
Reference in new issue
Block a user