git: 9front

Download patch

ref: 53add21f8552982e62c855d9a836ff69db078004
parent: a48282e19573ae60b8cb4e007e64416ec141fee4
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Oct 1 15:50:12 EDT 2025

acme/Mail: only require confirmation if the window is dirty (thanks flowerss)

--- a/sys/src/cmd/upas/Mail/comp.c
+++ b/sys/src/cmd/upas/Mail/comp.c
@@ -97,8 +97,14 @@
 static void
 compquit(Comp *c, char **, int)
 {
-	if(c->quitting == 0)
+    /* Read acme dirty flag from compose window ctl file */
+	char d;
+	pread(c->ctl, &d, 1, 58);
+
+	if(d == '1' && c->quitting == 0)
 		fprint(2, "composing message\n");
+	if(d != '1')
+		c->quitting++;
 	c->quitting++;
 }
 
--