diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/aerc.conf | 2 | ||||
-rw-r--r-- | config/templates.go | 2 | ||||
-rw-r--r-- | config/ui.go | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/config/aerc.conf b/config/aerc.conf index c6cd29d5..d6ffa389 100644 --- a/config/aerc.conf +++ b/config/aerc.conf @@ -73,7 +73,7 @@ #column-date={{.DateAutoFormat .Date.Local}} #column-name={{index (.From | names) 0}} #column-flags={{.Flags | join ""}} -#column-subject={{.ThreadPrefix}}{{.Subject}} +#column-subject={{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}} # # String separator inserted between columns. When the column width specifier is diff --git a/config/templates.go b/config/templates.go index 97ba89b8..ef304ae2 100644 --- a/config/templates.go +++ b/config/templates.go @@ -76,6 +76,8 @@ func (d *dummyData) Date() time.Time { return time.Now() } func (d *dummyData) DateAutoFormat(time.Time) string { return "" } func (d *dummyData) Header(string) string { return "" } func (d *dummyData) ThreadPrefix() string { return "└─>" } +func (d *dummyData) ThreadCount() int { return 0 } +func (d *dummyData) ThreadFolded() bool { return false } func (d *dummyData) Subject() string { return "Re: [PATCH] hey" } func (d *dummyData) SubjectBase() string { return "[PATCH] hey" } func (d *dummyData) Number() int { return 0 } diff --git a/config/ui.go b/config/ui.go index dfd66224..ff6fbccf 100644 --- a/config/ui.go +++ b/config/ui.go @@ -303,7 +303,8 @@ 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", `{{.ThreadPrefix}}{{.Subject}}`) + _, _ = section.NewKey("column-subject", + `{{.ThreadPrefix}}{{if .ThreadFolded}}{{printf "{%d}" .ThreadCount}}{{end}}{{.Subject}}`) } return ParseColumnDefs(key, section) } |