mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 20:38:44 +00:00
Remove unnecessary space if there are no decorations
This commit is contained in:
parent
2ea3758c4b
commit
a452467e06
@ -84,11 +84,11 @@ impl<'a> Printer<'a> {
|
|||||||
|
|
||||||
write!(
|
write!(
|
||||||
self.handle,
|
self.handle,
|
||||||
"{}{} ",
|
"{}{}",
|
||||||
" ".repeat(self.panel_width),
|
" ".repeat(self.panel_width),
|
||||||
self.colors
|
self.colors
|
||||||
.grid
|
.grid
|
||||||
.paint(if self.panel_width > 0 { "│" } else { "" }),
|
.paint(if self.panel_width > 0 { "│ " } else { "" }),
|
||||||
)?;
|
)?;
|
||||||
} else {
|
} else {
|
||||||
write!(self.handle, "{}", " ".repeat(self.panel_width))?;
|
write!(self.handle, "{}", " ".repeat(self.panel_width))?;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
File: sample.rs
|
File: sample.rs
|
||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
struct Rectangle {
|
struct Rectangle {
|
||||||
width: u32,
|
width: u32,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user