From 2fa6d8037cb7d1b7d5da87695857a0b7fd4b1def Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 16 Apr 2022 15:59:02 +1000 Subject: [PATCH] always show list counts --- pkg/gui/context/list_context_trait.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/gui/context/list_context_trait.go b/pkg/gui/context/list_context_trait.go index 16587ec69..04cbefcf9 100644 --- a/pkg/gui/context/list_context_trait.go +++ b/pkg/gui/context/list_context_trait.go @@ -27,6 +27,10 @@ func (self *ListContextTrait) GetViewTrait() types.IViewTrait { func (self *ListContextTrait) FocusLine() { // we need a way of knowing whether we've rendered to the view yet. self.viewTrait.FocusPoint(self.list.GetSelectedLineIdx()) + self.setFooter() +} + +func (self *ListContextTrait) setFooter() { self.viewTrait.SetFooter(formatListFooter(self.list.GetSelectedLineIdx(), self.list.Len())) } @@ -54,6 +58,7 @@ func (self *ListContextTrait) HandleRender() error { content := utils.RenderDisplayStrings(self.getDisplayStrings(0, self.list.Len())) self.viewTrait.SetContent(content) self.c.Render() + self.setFooter() return nil }