shithub: zuke

Download patch

ref: 4763cea22d8104b9fe1b3ef69885bd226512dbac
parent: c8357e7a68e4409caf36f96188f5aadfa45ec5bb
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Dec 5 08:01:44 EST 2019

fix songs list jumping when there is no scroll bar

--- a/zuke.c
+++ b/zuke.c
@@ -719,10 +719,10 @@
 					scroll = (m.xy.y - screen->r.min.y - Scrollheight/4)*plnum / (Dy(screen->r)-Scrollheight/2);
 				else
 					scroll = oldscroll + (lastclick.y - m.xy.y) / f->height;
+				if(scroll > plnum-scrollsz-1)
+					scroll = plnum-scrollsz-1;
 				if(scroll < 0)
 					scroll = 0;
-				else if(scroll > plnum-scrollsz-1)
-					scroll = plnum-scrollsz-1;
 				redraw(screen, 0);
 			}else{
 				pcur = scroll + (m.xy.y - screen->r.min.y)/f->height;
@@ -821,7 +821,7 @@
 
 			if(scroll > plnum - scrollsz)
 				scroll = plnum - scrollsz;
-			else if(scroll < 0)
+			if(scroll < 0)
 				scroll = 0;
 
 			if(pcur != oldpcur)