Skip to content

Commit 0b801dc

Browse files
committed
Move "CopyToClipboard" to the end
1 parent c544f39 commit 0b801dc

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

pkg/gui/controllers/confirmation_controller.go

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@ 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-
},
4535
{
4636
Key: opts.GetKey(opts.Config.Universal.Return),
4737
Handler: func() error { return self.context().State.OnClose() },
@@ -57,6 +47,21 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
5747
return nil
5848
},
5949
},
50+
{
51+
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
52+
Handler: func() error {
53+
confirmationView := self.c.Views().Confirmation
54+
text := confirmationView.Buffer()
55+
if err := self.c.OS().CopyToClipboard(text); err != nil {
56+
return err
57+
}
58+
59+
self.c.Toast(fmt.Sprintf("content %s", self.c.Tr.CopiedToClipboard))
60+
return nil
61+
},
62+
Description: self.c.Tr.CopyToClipboardMenu,
63+
DisplayOnScreen: true,
64+
},
6065
}
6166

6267
return bindings

0 commit comments

Comments
 (0)