MailView, StatusBar: Fix area bound check
parent
6cbb89a8e5
commit
d076ff573f
|
@ -1070,6 +1070,7 @@ impl Component for MailView {
|
|||
($($string:expr)+) => {
|
||||
$({
|
||||
if sticky || skip_header_ctr == 0 {
|
||||
if y <= get_y(bottom_right) {
|
||||
let (_x, _y) = write_string_to_grid(
|
||||
&$string,
|
||||
grid,
|
||||
|
@ -1079,8 +1080,9 @@ impl Component for MailView {
|
|||
(set_y(upper_left, y), bottom_right),
|
||||
Some(get_x(upper_left)),
|
||||
);
|
||||
clear_area(grid, ((_x, _y), (get_x(bottom_right), _y)), headers);
|
||||
clear_area(grid, ((std::cmp::min(_x, get_x(bottom_right)), _y), (get_x(bottom_right), _y)), headers);
|
||||
y = _y + 1;
|
||||
}
|
||||
} else {
|
||||
skip_header_ctr -= 1;
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ impl Component for StatusBar {
|
|||
get_x(upper_left),
|
||||
std::cmp::min(
|
||||
get_y(bottom_right) - height - hist_height + 1,
|
||||
get_y(bottom_right),
|
||||
get_y(pos_dec(bottom_right, (0, height))),
|
||||
),
|
||||
),
|
||||
pos_dec(bottom_right, (0, height)),
|
||||
|
@ -339,7 +339,7 @@ impl Component for StatusBar {
|
|||
get_x(upper_left),
|
||||
std::cmp::min(
|
||||
get_y(bottom_right) - height - hist_height + 1,
|
||||
get_y(bottom_right),
|
||||
get_y(pos_dec(bottom_right, (0, height))),
|
||||
),
|
||||
),
|
||||
pos_dec(bottom_right, (0, height)),
|
||||
|
|
Loading…
Reference in New Issue