1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Rename "Delete change" menu entry to "Discard change" in staging panel

For consistency with the previous commit.

Note that this menu entry is used both for unstaged and for staged changes, and
for staged changes it is not quite accurate, as we are not discarding changes in
that case (just unstaging them). Not sure it's worth fixing this; it's still
better than "Delete", anyway.
This commit is contained in:
Stefan Haller
2023-06-05 09:30:55 +02:00
parent 51a558040d
commit ee03a0be41
9 changed files with 12 additions and 12 deletions

View File

@ -66,8 +66,8 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.ResetSelection,
Description: self.c.Tr.ResetSelection,
Handler: self.DiscardSelection,
Description: self.c.Tr.DiscardSelection,
},
{
Key: opts.GetKey(opts.Config.Main.EditSelectHunk),
@ -166,7 +166,7 @@ func (self *StagingController) ToggleStaged() error {
return self.applySelectionAndRefresh(self.staged)
}
func (self *StagingController) ResetSelection() error {
func (self *StagingController) DiscardSelection() error {
reset := func() error { return self.applySelectionAndRefresh(true) }
if !self.staged && !self.c.UserConfig.Gui.SkipDiscardChangeWarning {