diff options
Diffstat (limited to 'src/bar_state.rs')
| -rw-r--r-- | src/bar_state.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bar_state.rs b/src/bar_state.rs index 656b88e..ec26efc 100644 --- a/src/bar_state.rs +++ b/src/bar_state.rs @@ -535,6 +535,7 @@ fn render_blocks( } } + #[derive(Debug)] struct BlockSeries<'a> { blocks: Vec<(&'a ComputedBlock, bool)>, delta: f64, @@ -598,7 +599,11 @@ fn render_blocks( // Remove all the empy blocks for s in &mut blocks_computed { s.blocks.retain(|(text, is_short)| { - (*is_short && text.short.as_ref().map_or(false, |s| s.width > 0.0)) + (*is_short + && text + .short + .as_ref() + .map_or(text.full.width > 0.0, |s| s.width > 0.0)) || (!is_short && text.full.width > 0.0) }); } @@ -649,6 +654,7 @@ fn render_blocks( } } +#[derive(Debug)] struct ComputedBlock { block: Block, full: ComputedText, |
