File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,6 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
32
32
Description : self .c .Tr .Confirm ,
33
33
DisplayOnScreen : true ,
34
34
},
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
- },
45
35
{
46
36
Key : opts .GetKey (opts .Config .Universal .Return ),
47
37
Handler : func () error { return self .context ().State .OnClose () },
@@ -57,6 +47,21 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
57
47
return nil
58
48
},
59
49
},
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
+ },
60
65
}
61
66
62
67
return bindings
You can’t perform that action at this time.
0 commit comments