diff --git a/src/main.rs b/src/main.rs index ce80e02..eb56906 100644 --- a/src/main.rs +++ b/src/main.rs @@ -265,7 +265,17 @@ impl App { .saturating_sub(stack.len() as u16) .saturating_sub(2)) { - stack.insert(0, ListItem::new(Span::raw("~"))); + stack.insert( + 0, + ListItem::new(Span::raw(match self.calculator.calculator_alignment { + CalculatorAlignment::Left => String::from("~"), + CalculatorAlignment::Right => format!( + "{: >width$}", + "~", + width = (chunks[1].width as usize).saturating_sub(2) + ), + })), + ); } let stack = List::new(stack).block(Block::default().borders(Borders::ALL).title("Stack"));