aboutsummaryrefslogtreecommitdiffstats
path: root/config/ui.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-03 17:37:05 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-08 00:42:56 +0100
commit35040bec9962cac3c92039fac85a4068e148b0a0 (patch)
treeca33752e9ad3d00894468ae489497d3d168faeee /config/ui.go
parent159ad244ee23d69f2491b139fd4384c7620b83c2 (diff)
downloadaerc-35040bec9962cac3c92039fac85a4068e148b0a0.tar.gz
templates: separate thread prefix from subject
Extract {{.ThreadPrefix}} from {{.Subject}} so that the prefix can be styled in a different color. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'config/ui.go')
-rw-r--r--config/ui.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/ui.go b/config/ui.go
index f52cf7f8..4b2a303a 100644
--- a/config/ui.go
+++ b/config/ui.go
@@ -284,7 +284,7 @@ func (*UIConfig) ParseIndexColumns(section *ini.Section, key *ini.Key) ([]*Colum
_, _ = section.NewKey("column-flags", `{{.Flags | join ""}}`)
}
if !section.HasKey("column-subject") {
- _, _ = section.NewKey("column-subject", `{{.Subject}}`)
+ _, _ = section.NewKey("column-subject", `{{.ThreadPrefix}}{{.Subject}}`)
}
return ParseColumnDefs(key, section)
}
@@ -382,7 +382,7 @@ func indexVerbToTemplate(verb rune) (f, name string) {
f = `{{.Cc | persons | join ", "}}`
name = "cc"
case 's':
- f = "{{.Subject}}"
+ f = "{{.ThreadPrefix}}{{.Subject}}"
name = "subject"
case 't':
f = "{{(index .To 0).Address}}"