1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Make the main view searchable

This commit is contained in:
Stefan Haller
2025-03-25 14:33:24 +01:00
parent 2b399a3c36
commit ec51efc82c
12 changed files with 34 additions and 2 deletions

View File

@ -44,6 +44,9 @@ func (self *SwitchToFocusedMainViewController) Context() types.Context {
func (self *SwitchToFocusedMainViewController) handleFocusMainView() error {
mainViewContext := self.c.Helpers().Window.GetContextForWindow("main")
mainViewContext.SetParentContext(self.context)
if context, ok := mainViewContext.(types.ISearchableContext); ok {
context.ClearSearchString()
}
self.c.Context().Push(mainViewContext, types.OnFocusOpts{})
return nil
}