9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...)
@ 2023-07-29 23:06 igor
  2023-07-29 23:40 ` ori
  0 siblings, 1 reply; 2+ messages in thread
From: igor @ 2023-07-29 23:06 UTC (permalink / raw)
  To: 9front; +Cc: igor

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

Unless there is any objection I would like to merge the below patch aimed
at improving usability of acme Mail.

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

Please let me know if you disagree.

Cheers,
Igor

<patch>
From: Igor Böhm <igor@9lab.org>
Date: Sat, 29 Jul 2023 21:45:26 +0000
Subject: [PATCH] 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.
---
diff e52c3b4a5ba1574b1ff65e134fb9118fe2a86bba 85d70636e05a86cea32e2babf57e6344ed91da86
--- 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

</patch>

[-- Attachment #2: acme-Mail-dots-vs-ellipsis.patch --]
[-- Type: text/plain, Size: 784 bytes --]

From: Igor Böhm <igor@9lab.org>
Date: Sat, 29 Jul 2023 21:45:26 +0000
Subject: [PATCH] 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.
---
diff e52c3b4a5ba1574b1ff65e134fb9118fe2a86bba 85d70636e05a86cea32e2babf57e6344ed91da86
--- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...)
  2023-07-29 23:06 [9front] [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...) igor
@ 2023-07-29 23:40 ` ori
  0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2023-07-29 23:40 UTC (permalink / raw)
  To: 9front; +Cc: igor

Quoth igor@9lab.org:
> Unless there is any objection I would like to merge the below patch aimed
> at improving usability of acme Mail.
> 
> See http://mux.9lab.org/img/scratch/acme-Mail-dots-vs-ellipsis.png for an
> illustration.
> 
> Please let me know if you disagree.
> 

lgtm.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-29 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-29 23:06 [9front] [PATCH] Mail: when space is tight use ellipsis (…) instead of 3 dots (...) igor
2023-07-29 23:40 ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).