mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Support custom keybindings for confirm discard
This commit is contained in:
parent
a670fbb33c
commit
6dc34d19ea
|
|
@ -223,6 +223,7 @@ type KeybindingFilesConfig struct {
|
|||
CommitChangesWithoutHook string `yaml:"commitChangesWithoutHook"`
|
||||
AmendLastCommit string `yaml:"amendLastCommit"`
|
||||
CommitChangesWithEditor string `yaml:"commitChangesWithEditor"`
|
||||
ConfirmDiscard string `yaml:"confirmDiscard"`
|
||||
IgnoreFile string `yaml:"ignoreFile"`
|
||||
RefreshFiles string `yaml:"refreshFiles"`
|
||||
StashAllChanges string `yaml:"stashAllChanges"`
|
||||
|
|
@ -592,6 +593,7 @@ func GetDefaultConfig() *UserConfig {
|
|||
ToggleTreeView: "`",
|
||||
OpenMergeTool: "M",
|
||||
OpenStatusFilter: "<c-b>",
|
||||
ConfirmDiscard: "x",
|
||||
},
|
||||
Branches: KeybindingBranchesConfig{
|
||||
CopyPullRequestURL: "<c-y>",
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
|
|||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES, types.WORKTREES}})
|
||||
},
|
||||
Key: 'x',
|
||||
Key: self.c.KeybindingsOpts().GetKey(self.c.UserConfig.Keybinding.Files.ConfirmDiscard),
|
||||
Tooltip: utils.ResolvePlaceholderString(
|
||||
self.c.Tr.DiscardAllTooltip,
|
||||
map[string]string{
|
||||
|
|
@ -109,7 +109,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
|
|||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES, types.WORKTREES}})
|
||||
},
|
||||
Key: 'x',
|
||||
Key: self.c.KeybindingsOpts().GetKey(self.c.UserConfig.Keybinding.Files.ConfirmDiscard),
|
||||
Tooltip: utils.ResolvePlaceholderString(
|
||||
self.c.Tr.DiscardAllTooltip,
|
||||
map[string]string{
|
||||
|
|
|
|||
Loading…
Reference in a new issue