From 385d95f800c1d9b2b41afc955ce053c1039ccb47 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Tue, 3 Dec 2024 18:50:48 +0100 Subject: [PATCH] correct scroll direction, at least --- crates/tek_tui/src/tui_view_phrase_editor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/tek_tui/src/tui_view_phrase_editor.rs b/crates/tek_tui/src/tui_view_phrase_editor.rs index e4544f31..97a73ad0 100644 --- a/crates/tek_tui/src/tui_view_phrase_editor.rs +++ b/crates/tek_tui/src/tui_view_phrase_editor.rs @@ -127,7 +127,7 @@ impl<'a> Content for PhraseView<'a> { let src_x = (x as usize + time_start) * time_scale; let src_y = y as usize + note_lo / 2; if src_x < buffer.width && src_y < buffer.height - 1 { - buffer.get(src_x, 63 - (buffer.height - src_y - 2)).map(|src|{ + buffer.get(src_x, (note_hi - y as usize) / 2).map(|src|{ cell.set_symbol(src.symbol()); cell.set_fg(src.fg); cell.set_bg(src.bg); @@ -280,7 +280,7 @@ impl PhraseEditorModel { } } for y in 0..buf.height { - if y >= 64 { + if y > 63 { break } let y = 63 - y;