summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/Config.md3
-rw-r--r--pkg/config/user_config.go4
-rw-r--r--pkg/gui/confirmation_panel.go24
-rw-r--r--pkg/gui/controllers/commit_message_controller.go4
-rw-r--r--pkg/gui/controllers/menu_controller.go8
-rw-r--r--pkg/gui/controllers/merge_conflicts_controller.go5
-rw-r--r--pkg/gui/controllers/patch_building_controller.go5
-rw-r--r--pkg/gui/controllers/remote_branches_controller.go5
-rw-r--r--pkg/gui/controllers/snake_controller.go4
-rw-r--r--pkg/gui/controllers/staging_controller.go5
-rw-r--r--pkg/gui/keybindings.go12
11 files changed, 0 insertions, 79 deletions
diff --git a/docs/Config.md b/docs/Config.md
index c02db15ee..22f2a8e9b 100644
--- a/docs/Config.md
+++ b/docs/Config.md
@@ -116,8 +116,6 @@ keybinding:
quit: 'q'
quit-alt1: '<c-c>' # alternative/alias of quit
return: '<esc>' # return to previous menu, will quit if there's nowhere to return
- # When set to a printable character, this will work for returning from non-prompt panels
- return-alt1: null
quitWithoutChangingDirectory: 'Q'
togglePanel: '<tab>' # goto the next panel
prevItem: '<up>' # go one line up
@@ -143,7 +141,6 @@ keybinding:
goInto: '<enter>'
openRecentRepos: '<c-r>'
confirm: '<enter>'
- confirm-alt1: 'y'
remove: 'd'
new: 'n'
edit: 'e'
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go
index ce2f7fbd8..864a672ba 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -138,7 +138,6 @@ type KeybindingUniversalConfig struct {
Quit string `yaml:"quit"`
QuitAlt1 string `yaml:"quit-alt1"`
Return string `yaml:"return"`
- ReturnAlt1 string `yaml:"return-alt1"`
QuitWithoutChangingDirectory string `yaml:"quitWithoutChangingDirectory"`
TogglePanel string `yaml:"togglePanel"`
PrevItem string `yaml:"prevItem"`
@@ -166,7 +165,6 @@ type KeybindingUniversalConfig struct {
Select string `yaml:"select"`
GoInto string `yaml:"goInto"`
Confirm string `yaml:"confirm"`
- ConfirmAlt1 string `yaml:"confirm-alt1"`
Remove string `yaml:"remove"`
New string `yaml:"new"`
Edit string `yaml:"edit"`
@@ -429,7 +427,6 @@ func GetDefaultConfig() *UserConfig {
Quit: "q",
QuitAlt1: "<c-c>",
Return: "<esc>",
- ReturnAlt1: "",
QuitWithoutChangingDirectory: "Q",
TogglePanel: "<tab>",
PrevItem: "<up>",
@@ -457,7 +454,6 @@ func GetDefaultConfig() *UserConfig {
Select: "<space>",
GoInto: "<enter>",
Confirm: "<enter>",
- ConfirmAlt1: "y",
Remove: "d",
New: "n",
Edit: "e",
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go
index a60017688..c3e50c2a1 100644
--- a/pkg/gui/confirmation_panel.go
+++ b/pkg/gui/confirmation_panel.go
@@ -243,21 +243,11 @@ func (gui *Gui) setKeyBindings(cancel context.CancelFunc, opts types.CreatePopup
},
{
ViewName: "confirmation",
- Key: keybindings.GetKey(keybindingConfig.Universal.ConfirmAlt1),
- Handler: onConfirm,
- },
- {
- ViewName: "confirmation",
Key: keybindings.GetKey(keybindingConfig.Universal.Return),
Handler: gui.wrappedConfirmationFunction(cancel, opts.HandleClose),
},
{
ViewName: "confirmation",
- Key: keybindings.GetKey(keybindingConfig.Universal.ReturnAlt1),
- Handler: gui.wrappedConfirmationFunction(cancel, opts.HandleClose),
- },
- {
- ViewName: "confirmation",
Key: keybindings.GetKey(keybindingConfig.Universal.TogglePanel),
Handler: func() error {
if len(gui.State.Suggestions) > 0 {
@@ -273,21 +263,11 @@ func (gui *Gui) setKeyBindings(cancel context.CancelFunc, opts types.CreatePopup
},
{
ViewName: "suggestions",
- Key: keybindings.GetKey(keybindingConfig.Universal.ConfirmAlt1),
- Handler: onSuggestionConfirm,
- },
- {
- ViewName: "suggestions",
Key: keybindings.GetKey(keybindingConfig.Universal.Return),
Handler: gui.wrappedConfirmationFunction(cancel, opts.HandleClose),
},
{
ViewName: "suggestions",
- Key: keybindings.GetKey(keybindingConfig.Universal.ReturnAlt1),
- Handler: gui.wrappedConfirmationFunction(cancel, opts.HandleClose),
- },
- {
- ViewName: "suggestions",
Key: keybindings.GetKey(keybindingConfig.Universal.TogglePanel),
Handler: func() error { return gui.replaceContext(gui.State.Contexts.Confirmation) },
},
@@ -305,13 +285,9 @@ func (gui *Gui) setKeyBindings(cancel context.CancelFunc, opts types.CreatePopup
func (gui *Gui) clearConfirmationViewKeyBindings() {
keybindingConfig := gui.c.UserConfig.Keybinding
_ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.Confirm), gocui.ModNone)
- _ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.ConfirmAlt1), gocui.ModNone)
_ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.Return), gocui.ModNone)
- _ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.ReturnAlt1), gocui.ModNone)
_ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.Confirm), gocui.ModNone)
- _ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.ConfirmAlt1), gocui.ModNone)
_ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.Return), gocui.ModNone)
- _ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.ReturnAlt1), gocui.ModNone)
}
func (gui *Gui) refreshSuggestions() {
diff --git a/pkg/gui/controllers/commit_message_controller.go b/pkg/gui/controllers/commit_message_controller.go
index 4e3ccd6e2..e5cdb866d 100644
--- a/pkg/gui/controllers/commit_message_controller.go
+++ b/pkg/gui/controllers/commit_message_controller.go
@@ -41,10 +41,6 @@ func (self *CommitMessageController) GetKeybindings(opts types.KeybindingsOpts)
Key: opts.GetKey(opts.Config.Universal.Return),
Handler: self.close,
},
- {
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.close,
- },
}
return bindings
diff --git a/pkg/gui/controllers/menu_controller.go b/pkg/gui/controllers/menu_controller.go
index 4c84a82de..6700fa99d 100644
--- a/pkg/gui/controllers/menu_controller.go
+++ b/pkg/gui/controllers/menu_controller.go
@@ -32,17 +32,9 @@ func (self *MenuController) GetKeybindings(opts types.KeybindingsOpts) []*types.
Handler: self.press,
},
{
- Key: opts.GetKey(opts.Config.Universal.ConfirmAlt1),
- Handler: self.press,
- },
- {
Key: opts.GetKey(opts.Config.Universal.Return),
Handler: self.close,
},
- {
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.close,
- },
}
return bindings
diff --git a/pkg/gui/controllers/merge_conflicts_controller.go b/pkg/gui/controllers/merge_conflicts_controller.go
index b35f846c2..7cfcfa62d 100644
--- a/pkg/gui/controllers/merge_conflicts_controller.go
+++ b/pkg/gui/controllers/merge_conflicts_controller.go
@@ -110,11 +110,6 @@ func (self *MergeConflictsController) GetKeybindings(opts types.KeybindingsOpts)
Handler: self.Escape,
Description: self.c.Tr.ReturnToFilesPanel,
},
- {
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.Escape,
- Description: self.c.Tr.ReturnToFilesPanel,
- },
}
return bindings
diff --git a/pkg/gui/controllers/patch_building_controller.go b/pkg/gui/controllers/patch_building_controller.go
index abbb4bdd1..613aadd1d 100644
--- a/pkg/gui/controllers/patch_building_controller.go
+++ b/pkg/gui/controllers/patch_building_controller.go
@@ -44,11 +44,6 @@ func (self *PatchBuildingController) GetKeybindings(opts types.KeybindingsOpts)
Handler: self.Escape,
Description: self.c.Tr.ExitCustomPatchBuilder,
},
- {
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.Escape,
- Description: self.c.Tr.ExitCustomPatchBuilder,
- },
}
}
diff --git a/pkg/gui/controllers/remote_branches_controller.go b/pkg/gui/controllers/remote_branches_controller.go
index 2f1382345..dcedde8c0 100644
--- a/pkg/gui/controllers/remote_branches_controller.go
+++ b/pkg/gui/controllers/remote_branches_controller.go
@@ -65,11 +65,6 @@ func (self *RemoteBranchesController) GetKeybindings(opts types.KeybindingsOpts)
Description: self.c.Tr.ReturnToRemotesList,
},
{
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.escape,
- Description: self.c.Tr.ReturnToRemotesList,
- },
- {
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.checkSelected(self.createResetMenu),
Description: self.c.Tr.LcViewResetOptions,
diff --git a/pkg/gui/controllers/snake_controller.go b/pkg/gui/controllers/snake_controller.go
index 4956c0c79..4217878e3 100644
--- a/pkg/gui/controllers/snake_controller.go
+++ b/pkg/gui/controllers/snake_controller.go
@@ -47,10 +47,6 @@ func (self *SnakeController) GetKeybindings(opts types.KeybindingsOpts) []*types
Key: opts.GetKey(opts.Config.Universal.Return),
Handler: self.Escape,
},
- {
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.Escape,
- },
}
return bindings
diff --git a/pkg/gui/controllers/staging_controller.go b/pkg/gui/controllers/staging_controller.go
index 0738ae1dc..1d8a24b95 100644
--- a/pkg/gui/controllers/staging_controller.go
+++ b/pkg/gui/controllers/staging_controller.go
@@ -54,11 +54,6 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ
Description: self.c.Tr.ReturnToFilesPanel,
},
{
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Handler: self.Escape,
- Description: self.c.Tr.ReturnToFilesPanel,
- },
- {
Key: opts.GetKey(opts.Config.Universal.TogglePanel),
Handler: self.TogglePanel,
Description: self.c.Tr.ToggleStagingPanel,
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 291c92288..b63c91905 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -75,12 +75,6 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
Handler: self.handleTopLevelReturn,
},
{
- ViewName: "",
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Modifier: gocui.ModNone,
- Handler: self.handleTopLevelReturn,
- },
- {
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.OpenRecentRepos),
Handler: self.handleCreateRecentReposMenu,
@@ -334,12 +328,6 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
Handler: self.handleSearchEscape,
},
{
- ViewName: "search",
- Key: opts.GetKey(opts.Config.Universal.ReturnAlt1),
- Modifier: gocui.ModNone,
- Handler: self.handleSearchEscape,
- },
- {
ViewName: "confirmation",
Key: opts.GetKey(opts.Config.Universal.PrevItem),
Modifier: gocui.ModNone,