shithub: zuke

Download patch

ref: b15a1446254cdc25014575e401e6420df9e4d21f
parent: eb8ca87074edfbe062cb5dc319ad342fc8918dad
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Dec 28 19:39:27 EST 2019

scroll bar: fix dragging with middle mouse button

--- a/zuke.c
+++ b/zuke.c
@@ -770,7 +770,7 @@
 				if(scrollsz >= plnum)
 					break;
 				if(usingscrollbar)
-					scroll = (m.xy.y - screen->r.min.y - Scrollheight/4)*plnum / (Dy(screen->r)-Scrollheight/2);
+					scroll = (m.xy.y - screen->r.min.y - Scrollheight/4)*(plnum - scrollsz) / (Dy(screen->r)-Scrollheight/2);
 				else
 					scroll = oldscroll + (lastclick.y - m.xy.y) / f->height;
 				if(scroll > plnum-scrollsz-1)