File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ func (self *OptionsMenuAction) Call() error {
4646 appendBindings (navigation , & types.MenuSection {Title : self .c .Tr .KeybindingsMenuSectionNavigation , Column : 1 })
4747
4848 return self .c .Menu (types.CreateMenuOptions {
49- Title : self .c .Tr .Keybindings ,
50- Items : menuItems ,
51- HideCancel : true ,
52- ColumnAlignment : []utils.Alignment {utils .AlignRight , utils .AlignLeft },
53- AllowFilteringKeybindings : true ,
54- KeepConfirmKeybindings : true ,
49+ Title : self .c .Tr .Keybindings ,
50+ Items : menuItems ,
51+ HideCancel : true ,
52+ ColumnAlignment : []utils.Alignment {utils .AlignRight , utils .AlignLeft },
53+ AllowFilteringKeybindings : true ,
54+ KeepConflictingKeybindings : true ,
5555 })
5656}
5757
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
4242 maxColumnSize = max (maxColumnSize , len (item .LabelColumns ))
4343
4444 // Remove all item keybindings that are the same as one of the essential bindings
45- if ! opts .KeepConfirmKeybindings && lo .Contains (essentialKeys , item .Key ) {
45+ if ! opts .KeepConflictingKeybindings && lo .Contains (essentialKeys , item .Key ) {
4646 item .Key = nil
4747 }
4848 }
Original file line number Diff line number Diff line change @@ -150,13 +150,13 @@ const (
150150)
151151
152152type CreateMenuOptions struct {
153- Title string
154- Prompt string // a message that will be displayed above the menu options
155- Items []* MenuItem
156- HideCancel bool
157- ColumnAlignment []utils.Alignment
158- AllowFilteringKeybindings bool
159- KeepConfirmKeybindings bool // if true, the keybindings that match the confirm binding will not be removed from menu items
153+ Title string
154+ Prompt string // a message that will be displayed above the menu options
155+ Items []* MenuItem
156+ HideCancel bool
157+ ColumnAlignment []utils.Alignment
158+ AllowFilteringKeybindings bool
159+ KeepConflictingKeybindings bool // if true, the keybindings that match essential bindings such as confirm or return will not be removed from menu items
160160}
161161
162162type CreatePopupPanelOpts struct {
You can’t perform that action at this time.
0 commit comments