From d5c70797ac9844db0a455e01c7bb3f99e6ca32b0 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 20 Dec 2023 20:20:20 +0100 Subject: fuck ye --- i_ui.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i_ui.go b/i_ui.go index 5236ef8..aa56c45 100644 --- a/i_ui.go +++ b/i_ui.go @@ -384,8 +384,10 @@ func i_ui(data *Data) { } data.s.Show() i_events(data, &sel, &sel_max, &term_size) - if int(sel) > term_size[H] - 4 { - // data.list_start = data.list + if int(sel) > data.list_start + term_size[H] - 4 { + data.list_start = int(sel + 1) - term_size[H] + 3 + } else if int(sel) < data.list_start { + data.list_start = int(sel) } } } -- cgit v1.2.3