[PATCH v2] compose: apply default style to header separator
Export this patch
---
v1 -> v2: Add a comment explaining the +1
widgets/compose.go | 6 +++ ---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/widgets/compose.go b/widgets/compose.go
index 6e2cdf3..965ab30 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -774,9 +774,9 @@ func (he *headerEditor) setValue(val string) {
}
func (he *headerEditor) Draw(ctx *ui.Context) {
- normalized := textproto.CanonicalMIMEHeaderKey(he.name)
- name := normalized + " "
- size := runewidth.StringWidth(name)
+ name := textproto.CanonicalMIMEHeaderKey(he.name)
+ // Extra character to put a blank cell between the header and the input
+ 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)
--
2.30.0
Hi,
Thanks for the updated patch.
Please do run go fmt though prior to submitting patches though.
As far as we are concerned non go fmt'ed code is malformed.
I've done it for you this time around and merged it.
Cheers,
Reto