From f996e47199a66cd8a49dc2cc0a2f0197333090ed Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 21 Dec 2025 12:06:28 +0100 Subject: [PATCH] Rename KeepConfirmKeybindings to KeepConflictingKeybindings After the change in the previous commit this expresses better what it is about. --- pkg/gui/controllers/options_menu_action.go | 12 ++++++------ pkg/gui/menu_panel.go | 2 +- pkg/gui/types/common.go | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkg/gui/controllers/options_menu_action.go b/pkg/gui/controllers/options_menu_action.go index 28819caba..e711f9df6 100644 --- a/pkg/gui/controllers/options_menu_action.go +++ b/pkg/gui/controllers/options_menu_action.go @@ -46,12 +46,12 @@ func (self *OptionsMenuAction) Call() error { appendBindings(navigation, &types.MenuSection{Title: self.c.Tr.KeybindingsMenuSectionNavigation, Column: 1}) return self.c.Menu(types.CreateMenuOptions{ - Title: self.c.Tr.Keybindings, - Items: menuItems, - HideCancel: true, - ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft}, - AllowFilteringKeybindings: true, - KeepConfirmKeybindings: true, + Title: self.c.Tr.Keybindings, + Items: menuItems, + HideCancel: true, + ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft}, + AllowFilteringKeybindings: true, + KeepConflictingKeybindings: true, }) } diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go index da1f45d09..2a4b6acca 100644 --- a/pkg/gui/menu_panel.go +++ b/pkg/gui/menu_panel.go @@ -42,7 +42,7 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error { maxColumnSize = max(maxColumnSize, len(item.LabelColumns)) // Remove all item keybindings that are the same as one of the essential bindings - if !opts.KeepConfirmKeybindings && lo.Contains(essentialKeys, item.Key) { + if !opts.KeepConflictingKeybindings && lo.Contains(essentialKeys, item.Key) { item.Key = nil } } diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index 2afe4f7d3..4c892508d 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -150,13 +150,13 @@ const ( ) type CreateMenuOptions struct { - Title string - Prompt string // a message that will be displayed above the menu options - Items []*MenuItem - HideCancel bool - ColumnAlignment []utils.Alignment - AllowFilteringKeybindings bool - KeepConfirmKeybindings bool // if true, the keybindings that match the confirm binding will not be removed from menu items + Title string + Prompt string // a message that will be displayed above the menu options + Items []*MenuItem + HideCancel bool + ColumnAlignment []utils.Alignment + AllowFilteringKeybindings bool + KeepConflictingKeybindings bool // if true, the keybindings that match essential bindings such as confirm or return will not be removed from menu items } type CreatePopupPanelOpts struct {