Fix for empty files

This commit is contained in:
sharkdp committed 2018-11-05 23:13:34 +01:00
1 parent 94980a817e
commit 4b7c44c207
1 file changed
+4
+4
View File
@@ -131,6 +131,10 @@ impl<'a> Printer<'a> {
fn print_textline(&mut self) -> io::Result<()> {
let len = self.line.len();
if len == 0 {
return Ok(());
}
let fill_spaces_front = match len {
n if n < 8 => 1 + 3 * (16 - n),
n => 3 * (16 - n),