aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 8e497c7..2a196d3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -117,7 +117,11 @@ fn main() {
if let Some(Event::Key(ch)) = evt {
match ch {
'q' | '\x03' => {
- break;
+ // Clear the clipboard on quit
+ match clipboard_ctx.set_contents("".to_owned()) {
+ Ok(_) => break,
+ Err(_) => continue,
+ }
}
'j' => {
if selection.y < options.len() + 1 {