From f267fe8c9e6a46e3fc372a84b8a5ff30b660db5b Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 22 Jul 2018 12:42:50 +0300 Subject: [PATCH] Micro fixes --- melib/src/mailbox/email/parser.rs | 4 ++-- src/bin.rs | 2 +- ui/src/components/mail/mod.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/melib/src/mailbox/email/parser.rs b/melib/src/mailbox/email/parser.rs index feab4dc2e..e6ad81f26 100644 --- a/melib/src/mailbox/email/parser.rs +++ b/melib/src/mailbox/email/parser.rs @@ -266,8 +266,8 @@ named!(pub subject, ws!(do_parse!( let list_len = list.len(); let mut i = 0; list.iter().fold(String::with_capacity(string_len), - |acc, x| { - let mut acc = acc + &x.replace("\n", ""); + |acc, x| { + let mut acc = acc + &x.replace("\n", "").replace("\t", " "); if i != list_len - 1 { acc.push_str(" "); i+=1; diff --git a/src/bin.rs b/src/bin.rs index 8340ab2ed..44b462661 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -85,7 +85,7 @@ fn main() { let menu = Entity {component: Box::new(AccountMenu::new(&state.context.accounts)) }; let listing = MailListing::new(); let b = Entity { component: Box::new(listing) }; - let window = Entity { component: Box::new(VSplit::new(menu, b, 80)) }; + let window = Entity { component: Box::new(VSplit::new(menu, b, 90)) }; let status_bar = Entity { component: Box::new(StatusBar::new(window)) }; state.register_entity(status_bar); diff --git a/ui/src/components/mail/mod.rs b/ui/src/components/mail/mod.rs index 52509266b..42dfa513c 100644 --- a/ui/src/components/mail/mod.rs +++ b/ui/src/components/mail/mod.rs @@ -23,7 +23,7 @@ pub struct AccountMenu { impl AccountMenu { pub fn new(accounts: &Vec) -> Self { - let accounts = accounts.iter().enumerate().map(|(i, a)| { + let accounts = accounts.iter().enumerate().map(|(i, a)| { AccountMenuEntry { name: a.name().to_string(), index: i, @@ -158,7 +158,7 @@ impl Component for AccountMenu { let upper_left = upper_left!(area); let bottom_right = bottom_right!(area); self.dirty = false; - let mut y = get_y(upper_left) + 1; + let mut y = get_y(upper_left); for a in &self.accounts { y += self.print_account(grid, (set_y(upper_left, y), bottom_right),