shithub: riscv

Download patch

ref: 36e0b53bb7386692682d261be62bda6562cdb99e
parent: 9e8b285562c35ef1c47f74ccafbda7f7624b22af
author: cinap_lenrek <cinap_lenrek@flatbox.9hal>
date: Fri Mar 9 08:33:26 EST 2012

mothra: buddah cursor wont reset on first page when load fails

--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -228,12 +228,12 @@
 }
 
 void donecurs(void){
-	if(current == nil)
-		return;
-	if(mothmode)
+	if(current && current->alldone==0)
+		esetcursor(&readingcurs);
+	else if(mothmode)
 		esetcursor(&mothcurs);
 	else
-		esetcursor(current->alldone ? 0 : &readingcurs);
+		esetcursor(0);
 }
 
 void scrollto(char *tag);
@@ -262,7 +262,7 @@
 	 * so that we can stop all subprocesses with a note,
 	 * and to isolate rendezvous from other processes
 	 */
-	if(cohort = rfork(RFPROC|RFNOTEG|RFNAMEG|RFREND)){
+	if(cohort=rfork(RFPROC|RFNOTEG|RFNAMEG|RFREND)){
 		atexit(killcohort);
 		notify(catch);
 		waitpid();
--