diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-16 15:59:02 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-16 17:29:17 +1000 |
commit | 2fa6d8037cb7d1b7d5da87695857a0b7fd4b1def (patch) | |
tree | 1ab0db06c9da6255bfb88c60274695e12f02208f /pkg/gui | |
parent | d3b6acf0961f7c7de97cd4dcfbcde39846c7ae8b (diff) |
always show list counts
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/context/list_context_trait.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 } |