Skip to content

Commit

Permalink
fix: Attempt copy only if copy is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
eslam-allam committed Apr 10, 2024
1 parent dcf2bed commit 74f4d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/notification/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
switch {
case key.Matches(msg, m.keys.DISMISS):
m.active = false
case key.Matches(msg, m.keys.COPY):
case m.copyAllowed && key.Matches(msg, m.keys.COPY):
clipboard.Write(clipboard.FmtText, []byte(m.message))
m.copied = true
cmd = func() tea.Msg {
Expand Down

0 comments on commit 74f4d69

Please sign in to comment.