mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-06-20 01:19:23 +02:00
Remove OptionMenuAlt1
For legacy reasons, OptionMenu was set to `<disabled>`, and OptionMenuAlt1 to `?`. This doesn't make a lot of sense any more; get rid of OptionMenuAlt1 and bind OptionMenu to `?` by default. This is a breaking change for users who rebound OptionMenuAlt1 in their config, but it doesn't strike me as very likely, and it's easy enough to fix.
This commit is contained in:
@@ -643,8 +643,7 @@ keybinding:
|
||||
|
||||
# <alt+delete> on Mac
|
||||
forwardDeleteWord: <ctrl+delete>
|
||||
optionMenu: <disabled>
|
||||
optionMenu-alt1: '?'
|
||||
optionMenu: '?'
|
||||
select: <space>
|
||||
goInto: <enter>
|
||||
confirm: <enter>
|
||||
|
||||
@@ -459,7 +459,6 @@ type KeybindingUniversalConfig struct {
|
||||
BackspaceWord string `yaml:"backspaceWord"` // <alt+backspace> on Mac
|
||||
ForwardDeleteWord string `yaml:"forwardDeleteWord"` // <alt+delete> on Mac
|
||||
OptionMenu string `yaml:"optionMenu"`
|
||||
OptionMenuAlt1 string `yaml:"optionMenu-alt1"`
|
||||
Select string `yaml:"select"`
|
||||
GoInto string `yaml:"goInto"`
|
||||
Confirm string `yaml:"confirm"`
|
||||
@@ -941,8 +940,7 @@ func GetDefaultConfigForPlatform(platform string) *UserConfig {
|
||||
MoveWordRight: platformKeyBinding(platform, map[string]string{"darwin": "<alt+right>"}, "<ctrl+right>"),
|
||||
BackspaceWord: platformKeyBinding(platform, map[string]string{"darwin": "<alt+backspace>"}, "<ctrl+backspace>"),
|
||||
ForwardDeleteWord: platformKeyBinding(platform, map[string]string{"darwin": "<alt+delete>"}, "<ctrl+delete>"),
|
||||
OptionMenu: "<disabled>",
|
||||
OptionMenuAlt1: "?",
|
||||
OptionMenu: "?",
|
||||
Select: "<space>",
|
||||
GoInto: "<enter>",
|
||||
Confirm: "<enter>",
|
||||
|
||||
@@ -75,21 +75,14 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
|
||||
DisplayOnScreen: true,
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
Key: opts.GetKey(opts.Config.Universal.OptionMenu),
|
||||
Handler: self.createOptionsMenu,
|
||||
OpensMenu: true,
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
Key: opts.GetKey(opts.Config.Universal.OptionMenuAlt1),
|
||||
// we have the description on the alt key and not the main key for legacy reasons
|
||||
// (the original main key was 'x' but we've reassigned that to other purposes)
|
||||
ViewName: "",
|
||||
Key: opts.GetKey(opts.Config.Universal.OptionMenu),
|
||||
Description: self.c.Tr.OpenKeybindingsMenu,
|
||||
Handler: self.createOptionsMenu,
|
||||
ShortDescription: self.c.Tr.Keybindings,
|
||||
DisplayOnScreen: true,
|
||||
Handler: self.createOptionsMenu,
|
||||
GetDisabledReason: self.optionsMenuDisabledReason,
|
||||
OpensMenu: true,
|
||||
DisplayOnScreen: true,
|
||||
},
|
||||
{
|
||||
ViewName: "",
|
||||
|
||||
@@ -14,7 +14,7 @@ var SwitchTabFromMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Files().IsFocused().
|
||||
Press(keys.Universal.OptionMenuAlt1)
|
||||
Press(keys.Universal.OptionMenu)
|
||||
|
||||
t.ExpectPopup().Menu().Title(Equals("Keybindings")).
|
||||
Select(Contains("Next tab")).
|
||||
|
||||
@@ -1431,10 +1431,6 @@
|
||||
"default": "\u003cctrl+delete\u003e"
|
||||
},
|
||||
"optionMenu": {
|
||||
"type": "string",
|
||||
"default": "\u003cdisabled\u003e"
|
||||
},
|
||||
"optionMenu-alt1": {
|
||||
"type": "string",
|
||||
"default": "?"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user