compose: apply default style to header separator

This commit is contained in:
Eyal Sawady 2021-01-13 02:08:09 -05:00 committed by Reto Brunner
parent 0e554a879d
commit d344ceecfe

View file

@ -770,9 +770,9 @@ func (he *headerEditor) setValue(val string) {
} }
func (he *headerEditor) Draw(ctx *ui.Context) { func (he *headerEditor) Draw(ctx *ui.Context) {
normalized := textproto.CanonicalMIMEHeaderKey(he.name) name := textproto.CanonicalMIMEHeaderKey(he.name)
name := normalized + " " // Extra character to put a blank cell between the header and the input
size := runewidth.StringWidth(name) size := runewidth.StringWidth(name) + 1
defaultStyle := he.uiConfig.GetStyle(config.STYLE_DEFAULT) defaultStyle := he.uiConfig.GetStyle(config.STYLE_DEFAULT)
headerStyle := he.uiConfig.GetStyle(config.STYLE_HEADER) headerStyle := he.uiConfig.GetStyle(config.STYLE_HEADER)
ctx.Fill(0, 0, size, ctx.Height(), ' ', defaultStyle) ctx.Fill(0, 0, size, ctx.Height(), ' ', defaultStyle)