summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-03-20 09:24:39 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-24 20:14:41 +1100
commite392b9f86ab7683b231de4c1addd1986cffc9d91 (patch)
treebf6e72ba9a8c931df82d64ecbe9fd53556565b39 /pkg/gui/context.go
parent67a76523fb8029a31fd540fdd5dc9aaf1c2e8473 (diff)
no more filterThenMap
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r--pkg/gui/context.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go
index 75e2a7357..e75eb0a05 100644
--- a/pkg/gui/context.go
+++ b/pkg/gui/context.go
@@ -14,14 +14,13 @@ import (
)
func (gui *Gui) popupViewNames() []string {
- return slices.FilterThenMap(gui.State.Contexts.Flatten(),
- func(c types.Context) bool {
- return c.GetKind() == types.PERSISTENT_POPUP || c.GetKind() == types.TEMPORARY_POPUP
- },
- func(c types.Context) string {
- return c.GetViewName()
- },
- )
+ popups := slices.Filter(gui.State.Contexts.Flatten(), func(c types.Context) bool {
+ return c.GetKind() == types.PERSISTENT_POPUP || c.GetKind() == types.TEMPORARY_POPUP
+ })
+
+ return slices.Map(popups, func(c types.Context) string {
+ return c.GetViewName()
+ })
}
func (gui *Gui) currentContextKeyIgnoringPopups() types.ContextKey {