summaryrefslogtreecommitdiff
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2021-11-05 10:34:10 +0100
committerRobin Jarry <robin@jarry.cc>2021-11-05 10:45:31 +0100
commit20752df89c3bef0aca23493bfe8a668b93db9947 (patch)
tree8af53669d04342b787285001047346f3bd147e8f /widgets/compose.go
parentb1daf08991675e879382f4c383dea50d671630ec (diff)
downloadaerc-20752df89c3bef0aca23493bfe8a668b93db9947.zip
viewer: add colon after header names
Display them as standard RFC 822 headers. Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 7233d30..69a2dcc 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -773,11 +773,11 @@ func (he *headerEditor) setValue(val string) {
func (he *headerEditor) Draw(ctx *ui.Context) {
name := textproto.CanonicalMIMEHeaderKey(he.name)
// Extra character to put a blank cell between the header and the input
- size := runewidth.StringWidth(name) + 1
+ size := runewidth.StringWidth(name+":") + 1
defaultStyle := he.uiConfig.GetStyle(config.STYLE_DEFAULT)
headerStyle := he.uiConfig.GetStyle(config.STYLE_HEADER)
ctx.Fill(0, 0, size, ctx.Height(), ' ', defaultStyle)
- ctx.Printf(0, 0, headerStyle, "%s", name)
+ ctx.Printf(0, 0, headerStyle, "%s:", name)
he.input.Draw(ctx.Subcontext(size, 0, ctx.Width()-size, 1))
}