mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-30 09:05:54 +00:00
Flush output on first print for /dev/zero fix
This commit is contained in:
1 parent
921327f2ae
commit
33d5b4dbda
1 file changed
+5
-1
+5
-1
@@ -621,7 +621,6 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
|||||||
}
|
}
|
||||||
if is_empty {
|
if is_empty {
|
||||||
self.print_header()?;
|
self.print_header()?;
|
||||||
is_empty = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// squeeze is active, check if the line is the same
|
// squeeze is active, check if the line is the same
|
||||||
@@ -649,6 +648,11 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
|||||||
}
|
}
|
||||||
self.writer.write_all(b"\n")?;
|
self.writer.write_all(b"\n")?;
|
||||||
|
|
||||||
|
if is_empty {
|
||||||
|
self.writer.flush()?;
|
||||||
|
is_empty = false;
|
||||||
|
}
|
||||||
|
|
||||||
// increment index to next line
|
// increment index to next line
|
||||||
self.idx += 8 * self.panels;
|
self.idx += 8 * self.panels;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user