Skip to content

Commit f372cec

Browse files
committed
Add "CopyToClipboard" command to ConfirmationController
1 parent 77a9207 commit f372cec

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/gui/controllers/confirmation_controller.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
3232
Description: self.c.Tr.Confirm,
3333
DisplayOnScreen: true,
3434
},
35+
{
36+
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
37+
Handler: func() error {
38+
confirmationView := self.c.Views().Confirmation
39+
text := confirmationView.Buffer()
40+
return self.c.OS().CopyToClipboard(text)
41+
},
42+
Description: self.c.Tr.CopyToClipboardMenu,
43+
DisplayOnScreen: true,
44+
},
3545
{
3646
Key: opts.GetKey(opts.Config.Universal.Return),
3747
Handler: func() error { return self.context().State.OnClose() },

0 commit comments

Comments
 (0)