shithub: pplay

Download patch

ref: 703a482160db136fe3ff6c6ba6586230d201a40a
parent: f8f88f389dcf31db90fa81c568569de210c387bf
author: qwx <[email protected]>
date: Sun Oct 29 23:15:36 EDT 2023

now fix replacing when wanting to insert

a969a06590d24e86258898866999ad2a1328f66e was incomplete, hooray

--- a/cmd.c
+++ b/cmd.c
@@ -140,7 +140,8 @@
 	Chunk *c;
 
 	d = *current;
-	d.off = -1;
+	if(d.from != 0 && d.to != d.totalsz)
+		d.off = -1;
 	fd = (intptr)efd;
 	if((c = loadfile(fd, &cd)) == nil){
 		fprint(2, "failed reading from pipe: %r");