From a9843d9374c1590a2ae40f6d6aa7195ca6701d49 Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Sun, 3 Jul 2022 14:43:38 -0400 Subject: [PATCH] Make sure the minibuffer doesn't allow styles to bleed through The minibuffer is another user of the overlay widget, and I need to configure it to unilaterally use the style of the upper canvas. Without this setting, the bold cursor position in the hex view below can bleed through. --- widgets/minibuffer/minibuffer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/minibuffer/minibuffer.go b/widgets/minibuffer/minibuffer.go index aaccced..822aaa0 100644 --- a/widgets/minibuffer/minibuffer.go +++ b/widgets/minibuffer/minibuffer.go @@ -457,7 +457,11 @@ func (w *Widget) updateCompletions(app gowid.IApp) { func Open(w *Widget, container gowid.ISettableComposite, width gowid.IWidgetDimension, app gowid.IApp) { w.ov = overlay.New(w, container.SubWidget(), gowid.VAlignBottom{}, gowid.RenderWithUnits{U: 3}, // Intended to mean use as much vertical space as you need - gowid.HAlignLeft{Margin: 5, MarginRight: 5}, width) + gowid.HAlignLeft{Margin: 5, MarginRight: 5}, width, + overlay.Options{ + IgnoreLowerStyle: true, + }, + ) if _, ok := width.(gowid.IRenderFixed); ok { w.SetContentWidth(gowid.RenderFixed{}, app) // fixed or weight:1, ratio:0.5