shithub: zuke

Download patch

ref: e9dcac3936cac5153e447fd2dd925ce204c4409c
parent: 6e8e1763053da3c3d71032d1477e4a10d47857f1
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu May 28 11:49:52 EDT 2020

don't move selection to the new playing track automatically

--- a/zuke.c
+++ b/zuke.c
@@ -766,7 +766,7 @@
 		{ nil, &key, CHANRCV },
 		{ nil, nil, CHANEND },
 	};
-	int fd, n, scrolling, oldpcur, oldbuttons;
+	int fd, n, scrolling, oldpcur, oldbuttons, pnew;
 
 	USED(argc); USED(argv);
 
@@ -903,22 +903,24 @@
 			case '>':
 				if(playercurr == nil)
 					break;
-				pcur = pcurplaying;
-				if(++pcur >= plnum)
-					pcur = 0;
+				pnew = pcurplaying;
+				if(++pnew >= plnum)
+					pnew = 0;
 				stop(playercurr);
-				playercurr = newplayer(pcur, 1);
+				playercurr = newplayer(pnew, 1);
 				start(playercurr);
+				redraw(1);
 				break;
 			case '<':
 				if(playercurr == nil)
 					break;
-				pcur = pcurplaying;
-				if(--pcur < 0)
-					pcur = plnum-1;
+				pnew = pcurplaying;
+				if(--pnew < 0)
+					pnew = plnum-1;
 				stop(playercurr);
-				playercurr = newplayer(pcur, 1);
+				playercurr = newplayer(pnew, 1);
 				start(playercurr);
+				redraw(1);
 				break;
 			case '-':
 				chvolume(-1);