From 7e94bc4f0a732229154d6d7da2a67686b4abe4a9 Mon Sep 17 00:00:00 2001 From: hkc Date: Fri, 20 Oct 2023 04:33:01 +0300 Subject: [PATCH] Improve scrolling when short list --- mess/tmpc.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mess/tmpc.lua b/mess/tmpc.lua index 1ca726a..ab094ce 100644 --- a/mess/tmpc.lua +++ b/mess/tmpc.lua @@ -282,12 +282,12 @@ local mplayer = { if self.screens[2].cursor > maxi then self.screens[2].scroll = self.screens[2].cursor - (th - 3) end - if self.screens[2].scroll < 0 then - self.screens[2].scroll = 0 - end if self.screens[2].scroll > #self.songs - (th - 3) then self.screens[2].scroll = #self.songs - (th - 3) end + if self.screens[2].scroll < 0 then + self.screens[2].scroll = 0 + end self.screens[2].textScroll = 0 end, handleClick = function(self, x, y)