git: 9front

Download patch

ref: 6268b98c85955aaff2344ca5ac3347709cc18710
parent: f616d52cd73124c42b916ffd56822bfe9b84adb7
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri Oct 11 23:18:44 EDT 2013

aux/statusbar: emit final newline in textmode when finished

bad:
term% echo 1 1 | aux/statusbar -t x
|###########################################################| 100% term%

vs.

good:
term% echo 1 1 | aux/statusbar -t x
|###########################################################| 100%
term%

--- a/sys/src/cmd/aux/statusbar.c
+++ b/sys/src/cmd/aux/statusbar.c
@@ -152,7 +152,10 @@
 		d = strtoll(f[1], 0, 0);
 		drawbar();
 	}
-	postnote(PNPROC, child, "kill");
+	if(textmode)
+		write(1, "\n", 1);
+	else
+		postnote(PNPROC, child, "kill");
 }
 
 
--