organize and solve logic bugs

This commit is contained in:
2025-11-12 08:22:56 -07:00
parent 889b8ae528
commit 8a682376d9
10 changed files with 108 additions and 109 deletions

View File

@@ -10,9 +10,7 @@ use ratatui::{
};
use crate::app::{
calc::Grid,
error_msg::ErrorMessage,
mode::Mode, screen::ScreenSpace,
error_msg::ErrorMessage, logic::calc::{CellType, Grid}, mode::Mode, screen::ScreenSpace
};
pub struct App {
@@ -110,9 +108,9 @@ impl Widget for &App {
(false, false) => {
if let Some(cell) = self.grid.get_cell_raw(x_idx, y_idx) {
match cell {
crate::app::calc::CellType::Number(c) => display = c.to_string(),
crate::app::calc::CellType::String(s) => display = s.to_owned(),
crate::app::calc::CellType::Equation(e) => {
CellType::Number(c) => display = c.to_string(),
CellType::String(s) => display = s.to_owned(),
CellType::Equation(e) => {
if let Some(val) = self.grid.evaluate(e) {
display = val.to_string();
style = Style::new()