diff options
author | Yash Srivastav <yash111998@gmail.com> | 2019-06-08 01:05:23 +0530 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-07 16:22:01 -0400 |
commit | fca7321639f77bbf825dc897156d7a21993a2c69 (patch) | |
tree | 5e503bf4ebd9672eef2af5cbad49b5b73405e548 /widgets/msglist.go | |
parent | 6d491569c0f95bec03cc837446c2836acabe99ae (diff) | |
download | aerc-fca7321639f77bbf825dc897156d7a21993a2c69.tar.gz |
Message list: implement index-format option
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r-- | widgets/msglist.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go index caa868f..f1cbb31 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -80,7 +80,12 @@ func (ml *MessageList) Draw(ctx *ui.Context) { style = style.Foreground(tcell.ColorGray) } ctx.Fill(0, row, ctx.Width(), 1, ' ', style) - ctx.Printf(0, row, style, "%s", msg.Envelope.Subject) + fmtStr, args, err := lib.ParseIndexFormat(ml.conf, i, msg) + if err != nil { + ctx.Printf(0, row, style, "%v", err) + } else { + ctx.Printf(0, row, style, fmtStr, args...) + } row += 1 } |