summaryrefslogtreecommitdiff
path: root/src/layout/tree.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-11-21 17:23:44 +0100
committerLaurenz <laurmaedje@gmail.com>2019-11-21 17:50:51 +0100
commitebff8eb038706404cb4601cf6853675319663e3f (patch)
tree2837b41d6a0b23920eed5713887a1639552aed3a /src/layout/tree.rs
parent131e81baaf668f76a7dd1d39a0d88afd5e4582ec (diff)
Fix spacing bugs 🚧
Diffstat (limited to 'src/layout/tree.rs')
-rw-r--r--src/layout/tree.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/layout/tree.rs b/src/layout/tree.rs
index 2edec631..f6a8f408 100644
--- a/src/layout/tree.rs
+++ b/src/layout/tree.rs
@@ -58,16 +58,11 @@ impl<'a, 'p> TreeLayouter<'a, 'p> {
}
fn layout_space(&mut self) {
- if !self.flex.run_is_empty() {
- self.flex.add_primary_space(word_spacing(&self.style), true);
- }
+ self.flex.add_primary_space(word_spacing(&self.style), true);
}
fn layout_paragraph(&mut self) -> LayoutResult<()> {
- if !self.flex.run_is_empty() {
- self.flex.add_secondary_space(paragraph_spacing(&self.style), true)?;
- }
- Ok(())
+ self.flex.add_secondary_space(paragraph_spacing(&self.style), true)
}
fn layout_func(&mut self, func: &FuncCall) -> LayoutResult<()> {