From fa9d75835c5cadf9a7fdc5875745dd7cc1ed40c4 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 12 Apr 2025 19:47:11 +0200 Subject: [PATCH] Rerender views if necessary when scrolling horizontally If the context says it wants to rerender when its width changes, we must also rerender when the horizontal scroll position changes. --- pkg/gui/controllers/list_controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/gui/controllers/list_controller.go b/pkg/gui/controllers/list_controller.go index c7a589af4..42f15d895 100644 --- a/pkg/gui/controllers/list_controller.go +++ b/pkg/gui/controllers/list_controller.go @@ -74,6 +74,9 @@ func (self *ListController) scrollHorizontal(scrollFunc func()) error { scrollFunc() self.context.HandleFocus(types.OnFocusOpts{}) + if self.context.NeedsRerenderOnWidthChange() == types.NEEDS_RERENDER_ON_WIDTH_CHANGE_WHEN_WIDTH_CHANGES { + self.context.HandleRender() + } return nil }