[PATCH] compose: apply default style to header separator
Export this patch
---
Before: https://p.d2evs.net/4040343151.png
After: https://p.d2evs.net/1991388899.png
The latter is more consistent with the styling of the message viewer:
https://p.d2evs.net/1087558366.png
widgets/compose.go | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/widgets/compose.go b/widgets/compose.go
index 6e2cdf3..577e50e 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -774,9 +774,8 @@ 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)
+ 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)
Can you please add a comment as to why you are doing the +1 dance?
It is entirely non obvious I think.
Else LGTM.
Cheers,
Reto
--
2.30.0
Hi,
Thanks for the patch, I see the problem...
On Thu, Jan 07, 2021 at 03:47:24AM -0500, Eyal Sawady wrote: