diff --git a/src/bin.rs b/src/bin.rs
index 79cc8cb75..fbdfe6980 100644
--- a/src/bin.rs
+++ b/src/bin.rs
@@ -144,11 +144,11 @@ fn main() {
let mut idxa = 0;
let mut idxm = 0;
+ let account_length = state.context.accounts.len();
'main: loop {
state.refresh_mailbox(idxa,idxm);
let folder_length = state.context.accounts[idxa].len();
state.render();
- state.redraw();
'inner: loop {
match receiver.recv().unwrap() {
@@ -183,7 +183,19 @@ fn main() {
idxm -= 1;
break 'inner;
},
- Key::Char(k @ 'g') => {
+ Key::Char('l') => if idxa + 1 < account_length {
+ idxa += 1;
+ idxm = 0;
+ break 'inner;
+ },
+ Key::Char('h') => if idxa > 0 {
+ idxa -= 1;
+ idxm = 0;
+ break 'inner;
+ },
+ Key::Char('r') => {
+ state.update_size();
+ state.render();
},
Key::Char(v) if v > '/' && v < ':' => {
},
diff --git a/src/ui/components/mail.rs b/src/ui/components/mail.rs
index ba0382953..7d15437e0 100644
--- a/src/ui/components/mail.rs
+++ b/src/ui/components/mail.rs
@@ -285,7 +285,11 @@ impl Component for MailListing {
grid[(x, mid+5)].set_fg(Color::Default);
}
}
- context.dirty_areas.push_back((set_y(upper_left, mid), set_y(bottom_right, mid+5)));
+ clear_area(grid,
+ (set_y(upper_left, mid+headers_rows), set_y(bottom_right, mid+headers_rows)));
+
+
+ context.dirty_areas.push_back((set_y(upper_left, mid), set_y(bottom_right, mid+headers_rows)));
/* Draw body */
self.draw_mail_view(grid,
@@ -398,37 +402,33 @@ impl AccountMenu {
}
}
- let mut ind = 0;
- let mut depth = String::from(" ");
+ let mut inc = 0;
+ let mut depth = String::from("");
let mut s = String::from(format!("\n\n {}\n", a.name));
fn pop(depth: &mut String) {
depth.pop();
depth.pop();
- depth.pop();
- depth.pop();
}
fn push(depth: &mut String, c: char) {
- depth.push(' ');
depth.push(c);
- depth.push(' ');
- depth.push(' ');
}
- fn print(root: usize, parents: &Vec