From 14baf17f4bd47377403c5d965c1fe294d2ec6ef0 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Mon, 2 Oct 2023 16:29:15 +0200 Subject: switcher: add scrollbar Add scrollbar to part switcher. Add config value "max-mime-height" to the [Viewer] section to set the maximum height before a scrollbar is drawn. The part switcher height is restricted to half of the context height. Update docs. Fixes: https://todo.sr.ht/~rjarry/aerc/194 Signed-off-by: Koni Marti Tested-by: Inwit Acked-by: Robin Jarry --- app/msgviewer.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/msgviewer.go') diff --git a/app/msgviewer.go b/app/msgviewer.go index 2189779a..bb63b28d 100644 --- a/app/msgviewer.go +++ b/app/msgviewer.go @@ -139,7 +139,7 @@ func NewMessageViewer( switcher: switcher, uiConfig: acct.UiConfig(), } - switcher.mv = mv + switcher.uiConfig = mv.uiConfig return mv } @@ -214,7 +214,6 @@ func createSwitcher( ) error { var err error switcher.selected = -1 - switcher.alwaysShowMime = config.Viewer.AlwaysShowMime if msg.MessageInfo().Error != nil { return fmt.Errorf("could not view message: %w", msg.MessageInfo().Error) -- cgit