diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-15 14:01:13 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-16 15:19:32 +1000 |
commit | b838b74801102b27782cc20c7396279630e77fba (patch) | |
tree | 7173208a9909fa1d33877fa9c019e556ea902eef /pkg/gui/context/list_context_trait.go | |
parent | 00afa30ebff2978e88cdab460b0f8ad818e1b502 (diff) |
do not highlight line if there are no items to display
Diffstat (limited to 'pkg/gui/context/list_context_trait.go')
-rw-r--r-- | pkg/gui/context/list_context_trait.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/gui/context/list_context_trait.go b/pkg/gui/context/list_context_trait.go index a10f0e3e9..16587ec69 100644 --- a/pkg/gui/context/list_context_trait.go +++ b/pkg/gui/context/list_context_trait.go @@ -37,6 +37,8 @@ func formatListFooter(selectedLineIdx int, length int) string { func (self *ListContextTrait) HandleFocus(opts ...types.OnFocusOpts) error { self.FocusLine() + self.viewTrait.SetHighlight(self.list.Len() > 0) + return self.Context.HandleFocus(opts...) } |