summaryrefslogtreecommitdiffstats
path: root/pkg/gui/searching.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-30 23:24:24 +1100
committerJesse Duffield <jessedduffield@gmail.com>2023-04-30 13:19:52 +1000
commit8edad826caf2fa48bfad33f9f8c4f3ba49a052da (patch)
tree0b49145e4f656e72441199b5a5c30176c898d7a7 /pkg/gui/searching.go
parent826128a8e03fb50f7287029ebac93c85712faecb (diff)
Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the gui package purely for the sake of better encapsulation
Diffstat (limited to 'pkg/gui/searching.go')
-rw-r--r--pkg/gui/searching.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/searching.go b/pkg/gui/searching.go
index a8580655c..270fe1efd 100644
--- a/pkg/gui/searching.go
+++ b/pkg/gui/searching.go
@@ -48,7 +48,7 @@ func (gui *Gui) onSelectItemWrapper(innerFunc func(int) error) func(int, int, in
return func(y int, index int, total int) error {
if total == 0 {
- return gui.renderString(
+ gui.c.SetViewContent(
gui.Views.Search,
fmt.Sprintf(
"no matches for '%s' %s",
@@ -56,8 +56,9 @@ func (gui *Gui) onSelectItemWrapper(innerFunc func(int) error) func(int, int, in
theme.OptionsFgColor.Sprintf("%s: exit search mode", keybindings.Label(keybindingConfig.Universal.Return)),
),
)
+ return nil
}
- _ = gui.renderString(
+ gui.c.SetViewContent(
gui.Views.Search,
fmt.Sprintf(
"matches for '%s' (%d of %d) %s",