mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-29 23:17:32 +02:00
Don't omit section headers when filtering the keybindings menu
This commit is contained in:
parent
649048c336
commit
9f0b4d0000
@ -112,13 +112,6 @@ func (self *MenuViewModel) GetDisplayStrings(_ int, _ int) [][]string {
|
||||
}
|
||||
|
||||
func (self *MenuViewModel) GetNonModelItems() []*NonModelItem {
|
||||
// Don't display section headers when we are filtering. The reason is that
|
||||
// filtering changes the order of the items (they are sorted by best match),
|
||||
// so all the sections would be messed up.
|
||||
if self.FilteredListViewModel.IsFiltering() {
|
||||
return []*NonModelItem{}
|
||||
}
|
||||
|
||||
result := []*NonModelItem{}
|
||||
menuItems := self.FilteredListViewModel.GetItems()
|
||||
var prevSection *types.MenuSection = nil
|
||||
|
@ -26,6 +26,7 @@ var FilterMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Filter("Ignore").
|
||||
Lines(
|
||||
// menu has filtered down to the one item that matches the filter
|
||||
Contains(`--- Local ---`),
|
||||
Contains(`Ignore`).IsSelected(),
|
||||
).
|
||||
Confirm()
|
||||
|
@ -20,6 +20,7 @@ var FilterMenuCancelFilterWithEscape = NewIntegrationTest(NewIntegrationTestArgs
|
||||
Filter("Ignore").
|
||||
Lines(
|
||||
// menu has filtered down to the one item that matches the filter
|
||||
Contains(`--- Local ---`),
|
||||
Contains(`Ignore`).IsSelected(),
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user