shithub: zuke

Download patch

ref: 3b856e43790fe995bde740e3339defcb5b54b6d2
parent: e62f9b68f8c6669be92c868688f72538f96350e9
author: Sigrid Haflínudóttir <[email protected]>
date: Wed Jun 3 17:20:17 EDT 2020

handle mouse scrolling

--- a/zuke.c
+++ b/zuke.c
@@ -912,6 +912,15 @@
 				scrolling = 0;
 			if(m.buttons == 0)
 				break;
+			if(m.buttons == 8){
+				scroll = MAX(scroll-scrollsz/4-1, 0);
+				redraw(1);
+				break;
+			}else if(m.buttons == 16){
+				scroll = MIN(scroll+scrollsz/4+1, plnum-scrollsz-1);
+				redraw(1);
+				break;
+			}
 
 			n = (m.xy.y - screen->r.min.y)/f->height;