Skip to content

Commit 494edfc

Browse files
committed
Call toast on copy success
1 parent c247cfb commit 494edfc

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
@@ -52,7 +52,12 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
5252
Handler: func() error {
5353
confirmationView := self.c.Views().Confirmation
5454
text := confirmationView.Buffer()
55-
return self.c.OS().CopyToClipboard(text)
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
5661
},
5762
Description: self.c.Tr.CopyToClipboardMenu,
5863
DisplayOnScreen: true,

0 commit comments

Comments
 (0)