diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 20:40:20 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 1fd0f31682a1b55f22508309e6a16a3e56ac0206 (patch) | |
tree | 45e05092c0d91d40708256d300fa1e5e07ab1c68 /pkg/gui/patch_building_panel.go | |
parent | e6a1bd656620d2b786266b593b197721d669085a (diff) |
only show rebasey commands on a local commit when patch building
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r-- | pkg/gui/patch_building_panel.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index c39568cdf..6e2bcf8af 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -1,6 +1,8 @@ package gui import ( + "strings" + "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -119,3 +121,11 @@ func (gui *Gui) secondaryPatchPanelUpdateOpts() *viewUpdateOpts { return nil } + +func (gui *Gui) handleCopyPatchToClipboard() error { + // TODO: test that this works + + return gui.OSCommand.CopyToClipboard( + strings.Join(gui.GitCommand.PatchManager.RenderEachFilePatch(true), "\n"), + ) +} |