shithub: fm

Download patch

ref: 0d3ec6c7f3344091acd91516a097d01c29840966
parent: 1da2343c78f70ff691716e5aefc44303a691da27
author: phil9 <[email protected]>
date: Mon Nov 15 12:08:26 EST 2021

add mouse2 scrolling

--- a/main.c
+++ b/main.c
@@ -263,6 +263,9 @@
 			n = (m->xy.y - sr.min.y) / lh;
 			scroll(-n, 1);
 		}else if(m->buttons == 2){
+			n = (m->xy.y - sr.min.y) * nmatches / Dy(sr);
+			loff = n;
+			redraw();
 		}else if(m->buttons == 4){
 			n = (m->xy.y - sr.min.y) / lh;
 			scroll(n, 1);