shithub: zuke

Download patch

ref: 8ff5ef4f608e33716123ee8001ada0685609c5b9
parent: cc90fbf9d5a4585753f1bdca62856b703a3f1825
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Feb 4 04:32:20 EST 2021

do not redraw on mouse move when not playing; lock display when entering

--- a/zuke.c
+++ b/zuke.c
@@ -319,7 +319,6 @@
 				shuffle != nil ? "∫ " : "",
 				(uvlong)(newseekmx >= 0 ? seekoff : msec)/1000,
 				dur/1000, volume);
-			seekmx = newseekmx;
 		}else{
 			snprint(tmp, sizeof(tmp), "%s%P %d%%",
 				shuffle != nil ? "∫ " : "",
@@ -962,8 +961,11 @@
 	int inc, i, a, cycle;
 
 	inc = (d == '/' || d == 'n') ? 1 : -1;
-	if(d == '/' || d == '?')
+	if(d == '/' || d == '?'){
+		lockdisplay(display);
 		sz = enter(inc > 0 ? "forward:" : "backward:", buf, sizeof(buf), mctl, kctl, nil);
+		unlockdisplay(display);
+	}
 	if(sz < 1)
 		return;
 
@@ -1248,8 +1250,10 @@
 	for(;;){
 ev:
 		oldpcur = pcur;
-		if(seekmx != newseekmx)
+		if(seekmx != newseekmx){
+			seekmx = newseekmx;
 			redraw(0);
+		}
 
 		switch(alt(a)){
 		case Emouse: