1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Fixed breaking integrtion tests(old)

This commit is contained in:
Phanindra kumar Paladi
2023-01-29 10:03:59 +05:30
parent f7f24dbfc1
commit df58c75ca4

View File

@@ -28,11 +28,6 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
OnPress: func() error { return gui.handleApplyPatch(true) },
Key: 'r',
},
{
Label: "copy patch to clipboard",
OnPress: func() error { return gui.copyPatchToClipboard() },
Key: 'y',
},
}
if gui.git.Patch.PatchManager.CanRebase && gui.git.Status.WorkingTreeState() == enums.REBASE_MODE_NONE {
@@ -74,6 +69,14 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
}
}
menuItems = append(menuItems, []*types.MenuItem{
{
Label: "copy patch to clipboard",
OnPress: func() error { return gui.copyPatchToClipboard() },
Key: 'y',
},
}...)
return gui.c.Menu(types.CreateMenuOptions{Title: gui.c.Tr.PatchOptionsTitle, Items: menuItems})
}
@@ -206,7 +209,7 @@ func (gui *Gui) copyPatchToClipboard() error {
return gui.c.Error(err)
}
gui.c.Toast(gui.c.Tr.Actions.CopyPatchToClipboard)
gui.c.Toast(gui.c.Tr.PatchCopiedToClipboard)
return nil
}