fix another small screen crash

This commit is contained in:
🪞👃🪞 2024-07-20 20:24:20 +03:00
parent 61c84ac030
commit 9df59a0af0

View file

@ -239,6 +239,9 @@ impl Sequencer {
} }
fn horizontal_notes (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> { fn horizontal_notes (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
if area.height < 2 {
return Ok(area)
}
let area = Rect { let area = Rect {
x: area.x + Self::H_KEYS_OFFSET, x: area.x + Self::H_KEYS_OFFSET,
y: area.y + 1, y: area.y + 1,
@ -258,6 +261,9 @@ impl Sequencer {
} }
fn horizontal_keys (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> { fn horizontal_keys (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
if area.height < 2 {
return Ok(area)
}
let area = Rect { let area = Rect {
x: area.x, x: area.x,
y: area.y + 1, y: area.y + 1,