Skip to content

Commit f3713e6

Browse files
committed
Call toast on copy success
1 parent aa52d3d commit f3713e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/gui/controllers/confirmation_controller.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
3131
Handler: func() error {
3232
confirmationView := self.c.Views().Confirmation
3333
text := confirmationView.Buffer()
34-
return self.c.OS().CopyToClipboard(text)
34+
if err := self.c.OS().CopyToClipboard(text); err != nil {
35+
return err
36+
}
37+
38+
self.c.Toast(fmt.Sprintf("content %s", self.c.Tr.CopiedToClipboard))
39+
return nil
3540
},
3641
Description: self.c.Tr.CopyToClipboardMenu,
3742
DisplayOnScreen: true,

0 commit comments

Comments
 (0)