diff options
author | Karim Khaleel <code.karim@gmail.com> | 2023-08-04 14:01:30 +0300 |
---|---|---|
committer | Karim Khaleel <code.karim@gmail.com> | 2023-09-20 08:35:41 +0300 |
commit | edec116cebe6dde1f8e7ce375fabc407c84d92b5 (patch) | |
tree | bbc27be98cc27ad51fe8d55df23bf9d66a2698ab /pkg/gui/types/context.go | |
parent | ab5875c78fcd7fc2f0cdbc867dc84ef4331a5de3 (diff) |
Add search history
Add search history for filterable and searchable views.
Diffstat (limited to 'pkg/gui/types/context.go')
-rw-r--r-- | pkg/gui/types/context.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index dca5b042c..e06138a99 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -4,6 +4,7 @@ import ( "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/patch_exploring" + "github.com/jesseduffield/lazygit/pkg/utils" "github.com/sasha-s/go-deadlock" ) @@ -87,9 +88,16 @@ type Context interface { HandleRenderToMain() error } +type ISearchHistoryContext interface { + Context + + GetSearchHistory() *utils.HistoryBuffer[string] +} + type IFilterableContext interface { Context IListPanelState + ISearchHistoryContext SetFilter(string) GetFilter() string @@ -100,6 +108,7 @@ type IFilterableContext interface { type ISearchableContext interface { Context + ISearchHistoryContext SetSearchString(string) GetSearchString() string |