[dev] [sent] [PATCH] infinite mode

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Sat, 24 Sep 2016 10:14:05 +0200

---
Jo dawg, I heard you like presentations so I put a presentation after your
presentation so you can have infinite presentations.
 sent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sent.c b/sent.c
index fc319be..8580d0a 100644
--- a/sent.c
+++ b/sent.c
_AT_@ -437,7 +437,7 @@ load(FILE *fp)
 void
 advance(const Arg *arg)
 {
-	int new_idx = idx + arg->i;
+	int new_idx = (idx + slidecount + arg->i) % slidecount;
 	LIMIT(new_idx, 0, slidecount-1);
 	if (new_idx != idx) {
 		if (slides[idx].img)
-- 
2.7.3
Received on Sat Sep 24 2016 - 10:14:05 CEST

This archive was generated by hypermail 2.3.0 : Sat Sep 24 2016 - 10:24:10 CEST