diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index bcb5c2f6f85..1e97f9214fd 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -499,25 +499,26 @@ type KeybindingStatusConfig struct { } type KeybindingFilesConfig struct { - CommitChanges string `yaml:"commitChanges"` - CommitChangesWithoutHook string `yaml:"commitChangesWithoutHook"` - AmendLastCommit string `yaml:"amendLastCommit"` - CommitChangesWithEditor string `yaml:"commitChangesWithEditor"` - FindBaseCommitForFixup string `yaml:"findBaseCommitForFixup"` - ConfirmDiscard string `yaml:"confirmDiscard"` - IgnoreFile string `yaml:"ignoreFile"` - RefreshFiles string `yaml:"refreshFiles"` - StashAllChanges string `yaml:"stashAllChanges"` - ViewStashOptions string `yaml:"viewStashOptions"` - ToggleStagedAll string `yaml:"toggleStagedAll"` - ViewResetOptions string `yaml:"viewResetOptions"` - Fetch string `yaml:"fetch"` - ToggleTreeView string `yaml:"toggleTreeView"` - OpenMergeOptions string `yaml:"openMergeOptions"` - OpenStatusFilter string `yaml:"openStatusFilter"` - CopyFileInfoToClipboard string `yaml:"copyFileInfoToClipboard"` - CollapseAll string `yaml:"collapseAll"` - ExpandAll string `yaml:"expandAll"` + CommitChanges string `yaml:"commitChanges"` + CommitChangesWithoutHook string `yaml:"commitChangesWithoutHook"` + AmendLastCommit string `yaml:"amendLastCommit"` + CommitChangesWithEditor string `yaml:"commitChangesWithEditor"` + FindBaseCommitForFixup string `yaml:"findBaseCommitForFixup"` + ConfirmDiscard string `yaml:"confirmDiscard"` + IgnoreFile string `yaml:"ignoreFile"` + RefreshFiles string `yaml:"refreshFiles"` + StashAllChanges string `yaml:"stashAllChanges"` + ViewStashOptions string `yaml:"viewStashOptions"` + ToggleStagedAll string `yaml:"toggleStagedAll"` + ViewResetOptions string `yaml:"viewResetOptions"` + ViewResetToUpstreamOptions string `yaml:"viewResetToUpstreamOptions"` + Fetch string `yaml:"fetch"` + ToggleTreeView string `yaml:"toggleTreeView"` + OpenMergeOptions string `yaml:"openMergeOptions"` + OpenStatusFilter string `yaml:"openStatusFilter"` + CopyFileInfoToClipboard string `yaml:"copyFileInfoToClipboard"` + CollapseAll string `yaml:"collapseAll"` + ExpandAll string `yaml:"expandAll"` } type KeybindingBranchesConfig struct { @@ -959,25 +960,26 @@ func GetDefaultConfig() *UserConfig { AllBranchesLogGraph: "a", }, Files: KeybindingFilesConfig{ - CommitChanges: "c", - CommitChangesWithoutHook: "w", - AmendLastCommit: "A", - CommitChangesWithEditor: "C", - FindBaseCommitForFixup: "", - IgnoreFile: "i", - RefreshFiles: "r", - StashAllChanges: "s", - ViewStashOptions: "S", - ToggleStagedAll: "a", - ViewResetOptions: "D", - Fetch: "f", - ToggleTreeView: "`", - OpenMergeOptions: "M", - OpenStatusFilter: "", - ConfirmDiscard: "x", - CopyFileInfoToClipboard: "y", - CollapseAll: "-", - ExpandAll: "=", + CommitChanges: "c", + CommitChangesWithoutHook: "w", + AmendLastCommit: "A", + CommitChangesWithEditor: "C", + FindBaseCommitForFixup: "", + IgnoreFile: "i", + RefreshFiles: "r", + StashAllChanges: "s", + ViewStashOptions: "S", + ToggleStagedAll: "a", + ViewResetOptions: "D", + ViewResetToUpstreamOptions: "U", + Fetch: "f", + ToggleTreeView: "`", + OpenMergeOptions: "M", + OpenStatusFilter: "", + ConfirmDiscard: "x", + CopyFileInfoToClipboard: "y", + CollapseAll: "-", + ExpandAll: "=", }, Branches: KeybindingBranchesConfig{ CopyPullRequestURL: "", diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go index 9efe2f8f622..56e5a415bb8 100644 --- a/pkg/gui/controllers/files_controller.go +++ b/pkg/gui/controllers/files_controller.go @@ -152,7 +152,7 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types DisplayOnScreen: true, }, { - Key: opts.GetKey(opts.Config.Commits.ViewResetOptions), + Key: opts.GetKey(opts.Config.Files.ViewResetToUpstreamOptions), Handler: self.createResetToUpstreamMenu, Description: self.c.Tr.ViewResetToUpstreamOptions, OpensMenu: true,