git: 9front

Download patch

ref: df10e898b9db49472ef47d9679f777a310fe0517
parent: 063e2eb3ea8618bb0e5eaebcfe4ce4336c71d8c1
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Sep 25 16:48:57 EDT 2025

acme/Mail: require confirmation do Del a composing message

--- a/sys/src/cmd/upas/Mail/comp.c
+++ b/sys/src/cmd/upas/Mail/comp.c
@@ -97,7 +97,9 @@
 static void
 compquit(Comp *c, char **, int)
 {
-	c->quitting = 1;
+	if(c->quitting == 0)
+		fprint(2, "composing message\n");
+	c->quitting++;
 }
 
 static Fn compfn[] = {
@@ -119,13 +121,10 @@
 	c->quitting = 0;
 	c->qnext = mbox.opencomp;
 	mbox.opencomp = c;
-	fprint(c->ctl, "clean\n");
 	mbox.nopen++;
-	while(!c->quitting){
+	while(c->quitting < 2){
 		if(winevent(c, &ev) != 'M')
 			continue;
-		if(strcmp(ev.text, "Del") == 0)
-			break;
 		switch(ev.type){
 		case 'l':
 		case 'L':
--