Skip to content

Commit

Permalink
fix(clipboard): no crash on clipboard error
Browse files Browse the repository at this point in the history
  • Loading branch information
sarub0b0 committed Apr 21, 2023
1 parent ce9c70e commit a84c732
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tui_wrapper/widget/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,9 @@ impl WidgetTrait for Text {

if let Some(clipboard) = &mut self.clipboard {
logger!(info, "Clipboard saved '{}'", contents);
clipboard.borrow_mut().set_contents(contents).unwrap()
if let Err(e) = clipboard.borrow_mut().set_contents(contents) {
logger!(error, "Clipboard Error '{}'", e);
}
}

self.follow = highlight_content.follow;
Expand Down

0 comments on commit a84c732

Please sign in to comment.