mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
Add key bindings to filtering menu
This commit is contained in:
parent
da32b59e11
commit
b5d97570f1
@ -60,6 +60,7 @@ func (self *FilteringMenuAction) Call() error {
|
|||||||
|
|
||||||
menuItems = append(menuItems, &types.MenuItem{
|
menuItems = append(menuItems, &types.MenuItem{
|
||||||
Label: self.c.Tr.FilterPathOption,
|
Label: self.c.Tr.FilterPathOption,
|
||||||
|
Key: 'p',
|
||||||
OnPress: func() error {
|
OnPress: func() error {
|
||||||
self.c.Prompt(types.PromptOpts{
|
self.c.Prompt(types.PromptOpts{
|
||||||
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetFilePathSuggestionsFunc(),
|
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetFilePathSuggestionsFunc(),
|
||||||
@ -76,6 +77,7 @@ func (self *FilteringMenuAction) Call() error {
|
|||||||
|
|
||||||
menuItems = append(menuItems, &types.MenuItem{
|
menuItems = append(menuItems, &types.MenuItem{
|
||||||
Label: self.c.Tr.FilterAuthorOption,
|
Label: self.c.Tr.FilterAuthorOption,
|
||||||
|
Key: 'a',
|
||||||
OnPress: func() error {
|
OnPress: func() error {
|
||||||
self.c.Prompt(types.PromptOpts{
|
self.c.Prompt(types.PromptOpts{
|
||||||
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetAuthorsSuggestionsFunc(),
|
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetAuthorsSuggestionsFunc(),
|
||||||
@ -93,6 +95,7 @@ func (self *FilteringMenuAction) Call() error {
|
|||||||
if self.c.Modes().Filtering.Active() {
|
if self.c.Modes().Filtering.Active() {
|
||||||
menuItems = append(menuItems, &types.MenuItem{
|
menuItems = append(menuItems, &types.MenuItem{
|
||||||
Label: self.c.Tr.ExitFilterMode,
|
Label: self.c.Tr.ExitFilterMode,
|
||||||
|
Key: 's',
|
||||||
OnPress: self.c.Helpers().Mode.ClearFiltering,
|
OnPress: self.c.Helpers().Mode.ClearFiltering,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user