From 72e301887f78d5f34c23c426d6f073d921d00ad6 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Wed, 23 Oct 2019 13:38:03 +0300 Subject: [PATCH] ui/compose: clear empty space area properly --- ui/src/components/mail/compose.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/src/components/mail/compose.rs b/ui/src/components/mail/compose.rs index 6316ddd0..0002b9f3 100644 --- a/ui/src/components/mail/compose.rs +++ b/ui/src/components/mail/compose.rs @@ -471,7 +471,7 @@ impl Component for Composer { Color::Byte(189), Color::Byte(167), ); - if mid != 0 { + if mid != 0 && self.reply_context.is_none() { clear_area( grid, ( @@ -489,6 +489,17 @@ impl Component for Composer { bottom_right, ), ); + } else if mid != 0 { + clear_area( + grid, + ( + ( + get_x(bottom_right).saturating_sub(mid), + get_y(upper_left) - 1, + ), + (get_x(bottom_right).saturating_sub(mid), get_y(bottom_right)), + ), + ); } /* Regardless of view mode, do the following */