diff --git a/src/calc.rs b/src/calc.rs index f0ceb23..de36418 100644 --- a/src/calc.rs +++ b/src/calc.rs @@ -383,9 +383,10 @@ impl Calculator { pub fn get_status_line(&self) -> String { format!( - "[{}] [{}] [{}]", + "[{}] [{}] [{}] [{}]", self.display_mode, self.angle_mode, + self.calculator_alignment, if self.save_on_close { "W" } else { "w" } ) } diff --git a/src/calc/constants.rs b/src/calc/constants.rs index 0f7280a..5ff5275 100644 --- a/src/calc/constants.rs +++ b/src/calc/constants.rs @@ -107,3 +107,12 @@ impl Default for CalculatorAlignment { CalculatorAlignment::Left } } + +impl fmt::Display for CalculatorAlignment { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + CalculatorAlignment::Left => write!(f, "L"), + CalculatorAlignment::Right => write!(f, "R"), + } + } +}