code: plan9front

Download patch

ref: 06c482ecc7e168719718ba8e853261265b4a3cbd
parent: 02c6058f5d529e41afb0208c69f0cbf694b02b18
author: Igor Böhm <igor@9lab.org>
date: Sat Jul 29 17:45:26 EDT 2023

Mail: when space is tight use ellipsis (…) instead of 3 dots (...)

See http://mux.9lab.org/img/scratch/acme-Mail-dots-vs-ellipsis.png
as an illustration.

--- a/sys/src/cmd/upas/Mail/mbox.c
+++ b/sys/src/cmd/upas/Mail/mbox.c
@@ -461,8 +461,8 @@
 	else{
 		dots = "";
 		if(utflen(s) > width){
-			width -= 3;
-			dots = "...";
+			width -= 1;
+			dots = "…";
 		}
 		Bprint(bp, "%*.*s%s", -width, width, s, dots);
 	}
@@ -471,7 +471,7 @@
 /*
  * Message format string:
  * ======================
-  * %s: subject
+ * %s: subject
  * %f: from address
  * %F: name + from address
  * %t: to address