diff --git a/ui/src/components/mail/status.rs b/ui/src/components/mail/status.rs index 990d9b523..1c72c0300 100644 --- a/ui/src/components/mail/status.rs +++ b/ui/src/components/mail/status.rs @@ -225,7 +225,8 @@ impl Component for StatusPanel { impl StatusPanel { pub fn new() -> StatusPanel { - let content = CellBuffer::new(120, 40, Cell::default()); + let mut content = CellBuffer::new(120, 40, Cell::default()); + content.set_growable(true); StatusPanel { cursor: (0, 0), diff --git a/ui/src/terminal/cells.rs b/ui/src/terminal/cells.rs index 6e18b858b..7183b1826 100644 --- a/ui/src/terminal/cells.rs +++ b/ui/src/terminal/cells.rs @@ -765,17 +765,21 @@ macro_rules! inspect_bounds { let bounds = $grid.size(); let (upper_left, bottom_right) = $area; if $x > (get_x(bottom_right)) || $x > get_x(bounds) { - $x = get_x(upper_left); - $y += 1; - if $y > (get_y(bottom_right)) || $y > get_y(bounds) { - if $grid.growable { - $grid.resize($grid.cols, $grid.rows * 2, Cell::default()); - } else { - return ($x, $y - 1); + if $grid.growable { + $grid.resize($grid.cols * 2, $grid.rows, Cell::default()); + } else { + $x = get_x(upper_left); + $y += 1; + if !$line_break { + break; } } - if !$line_break { - break; + } + if $y > (get_y(bottom_right)) || $y > get_y(bounds) { + if $grid.growable { + $grid.resize($grid.cols, $grid.rows * 2, Cell::default()); + } else { + return ($x, $y - 1); } } };