mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Make searching available in the filtered commits list
It is already possible to search a filtered list by searching first, and then enabling a filter, so I found it inconsistent to not allow searching when you are already filtering. One reason for not allowing this might be that the search status (on the left) hides the filter status (on the right), but if we think that's enough reason to not allow both at the same time, then we should cancel a search when we enter filtering.
This commit is contained in:
parent
8522337f32
commit
926061557b
1 changed files with 9 additions and 7 deletions
|
@ -207,14 +207,8 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
|
|||
Description: self.c.Tr.MarkAsBaseCommit,
|
||||
Tooltip: self.c.Tr.MarkAsBaseCommitTooltip,
|
||||
},
|
||||
// overriding these navigation keybindings because we might need to load
|
||||
// overriding this navigation keybinding because we might need to load
|
||||
// more commits on demand
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.StartSearch),
|
||||
Handler: self.openSearch,
|
||||
Description: self.c.Tr.StartSearch,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.GotoBottom),
|
||||
Handler: self.gotoBottom,
|
||||
|
@ -228,6 +222,14 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
|
|||
}
|
||||
|
||||
bindings := append(outsideFilterModeBindings, []*types.Binding{
|
||||
// overriding this navigation keybinding because we might need to load
|
||||
// more commits on demand
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.StartSearch),
|
||||
Handler: self.openSearch,
|
||||
Description: self.c.Tr.StartSearch,
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Commits.AmendToCommit),
|
||||
Handler: self.withItem(self.amendTo),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue