Skip to content

Commit

Permalink
fix: clipboard issues (#579)
Browse files Browse the repository at this point in the history
fix #447
  • Loading branch information
dubisdev authored Aug 30, 2022
1 parent 8d2369f commit badaba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/main/components/Cerebro/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ class Cerebro extends Component {
if (event.metaKey || event.ctrlKey) {
if (event.keyCode === 67) {
// Copy to clipboard on cmd+c
const text = this.highlightedResult().clipboard
const text = this.highlightedResult()?.clipboard || this.props.term
if (text) {
clipboard.writeText(text)
this.props.actions.reset()
if (!event.defaultPrevented) {
this.electronWindow.hide()
}
event.preventDefault()
}
return
Expand Down

0 comments on commit badaba5

Please sign in to comment.