From 3e177eab4110067022eddf7c48e4f4ea31a29bd6 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 20 Dec 2023 20:20:20 +0100 Subject: wip --- i_ui.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i_ui.go b/i_ui.go index dced789..3c0638d 100644 --- a/i_ui.go +++ b/i_ui.go @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_ui.go - * Wed Dec 20 13:53:02 2023 + * Wed Dec 20 15:24:42 2023 * Joe * * interfacing with the user @@ -49,6 +49,7 @@ package main import ( "strconv" + "github.com/gdamore/tcell/v2" "golang.org/x/term" ) @@ -383,9 +384,8 @@ func i_ui(data *Data) { } data.s.Show() i_events(data, &sel, &sel_max, &term_size) - data.list_start = int(sel) - term_size[H] - 4 - if data.list_start < 0 { - data.list_start = 0 + if int(sel) > term_size[H] - 6 { + data.list_start += 1 } } } -- cgit v1.2.3