From a43d7fc57b02b0024f43ef117be1f0dbd656e58c Mon Sep 17 00:00:00 2001 From: joel16 Date: Sun, 7 Jan 2024 10:38:52 -0500 Subject: [PATCH] gui: Fix scrolling to end of list when list is < max entries --- app/source/gui.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/source/gui.c b/app/source/gui.c index c253627..c091ccc 100644 --- a/app/source/gui.c +++ b/app/source/gui.c @@ -428,7 +428,11 @@ static int guiControlFileBrowserEndList(void *param) { vlfGuiRemoveTextFocus(gui.text[gui.selected - gui.start], 1); gui.selected = (g_file_list.length - 1); - gui.start = (g_file_list.length - 1) - (max_entries - 1); + + if ((gui.selected == (g_file_list.length - 1)) && ((g_file_list.length - 1) > (max_entries - 1))) { + gui.start = (g_file_list.length - 1) - (max_entries - 1); + } + guiRefreshFileList(false); vlfGuiSetTextFocus(gui.text[gui.selected - gui.start]);