Skip to content

Commit

Permalink
Merge pull request #211 from sharifhsn/devzero
Browse files Browse the repository at this point in the history
`/dev/zero` fix (final)
  • Loading branch information
sharkdp committed Dec 11, 2023
2 parents 921327f + 33d5b4d commit 1792090
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
}
if is_empty {
self.print_header()?;
is_empty = false;
}

// squeeze is active, check if the line is the same
Expand Down Expand Up @@ -649,6 +648,11 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
}
self.writer.write_all(b"\n")?;

if is_empty {
self.writer.flush()?;
is_empty = false;
}

// increment index to next line
self.idx += 8 * self.panels;

Expand Down

0 comments on commit 1792090

Please sign in to comment.