Keep termenv profile in RenderContext

This commit is contained in:
Christian Muehlhaeuser
2020-01-31 14:47:00 +01:00
parent 7467d9e1a5
commit 66b7555d75
9 changed files with 43 additions and 39 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ func NewMarginWriter(ctx RenderContext, w io.Writer, rules StyleBlock) *MarginWr
pw := &padding.Writer{
Padding: bs.Width(ctx),
PadFunc: func(wr io.Writer) {
renderText(w, rules.StylePrimitive, " ")
renderText(w, ctx.colorProfile, rules.StylePrimitive, " ")
},
Forward: &ansi.Writer{
Forward: w,
@@ -46,7 +46,7 @@ func NewMarginWriter(ctx RenderContext, w io.Writer, rules StyleBlock) *MarginWr
iw := &indent.Writer{
Indent: indentation + margin,
IndentFunc: func(wr io.Writer) {
renderText(w, bs.Parent().Style.StylePrimitive, ic)
renderText(w, ctx.colorProfile, bs.Parent().Style.StylePrimitive, ic)
},
Forward: &ansi.Writer{
Forward: pw,