diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-11-23 06:36:59 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-11-24 02:18:41 +0200 |
commit | b7c48a1ed0d952aad37da248963bb1fcf0456017 (patch) | |
tree | 8915dbe14467f37e833b680cd1bed19547690bf0 /src | |
parent | f25f93fccf667f2b7bc9040ce6c976adfe0bbcc7 (diff) |
view/thread: make list draw area consistent
Diffstat (limited to 'src')
-rw-r--r-- | src/components/mail/view/thread.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/components/mail/view/thread.rs b/src/components/mail/view/thread.rs index 92ac2c20..9d09b119 100644 --- a/src/components/mail/view/thread.rs +++ b/src/components/mail/view/thread.rs @@ -441,9 +441,7 @@ impl ThreadView { /// draw the list fn draw_list(&mut self, grid: &mut CellBuffer, area: Area, context: &mut Context) { - /* Make space on the left for the scrollbar */ - let mut upper_left = pos_inc(upper_left!(area), (1, 0)); - let bottom_right = bottom_right!(area); + let (upper_left, bottom_right) = area; let (width, height) = self.content.size(); if height == 0 { context.dirty_areas.push_back(area); @@ -517,9 +515,6 @@ impl ThreadView { .iter() .flat_map(|ref v| v.iter()) .collect(); - if rows >= visibles.len() { - upper_left = pos_dec(upper_left!(area), (1, 0)); - } for (visible_entry_counter, v) in visibles.iter().skip(top_idx).take(rows).enumerate() { if visible_entry_counter >= rows { @@ -594,9 +589,6 @@ impl ThreadView { .iter() .flat_map(|ref v| v.iter()) .collect(); - if rows >= visibles.len() { - upper_left = pos_dec(upper_left!(area), (1, 0)); - } for &idx in &[old_cursor_pos, self.cursor_pos] { let entry_idx = *visibles[idx]; let src_area = { get_entry_area(entry_idx, &self.entries) }; |