diff --git a/src/main.rs b/src/main.rs index acd5cd9..5320446 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,15 @@ impl History { } fn update(&mut self) { - //clipboard.get_text().unwrap() + let clip = self.clipboard.get_text().unwrap(); + + for entry in &self.entries { + if &clip == entry { + return + } + } + + self.entries.insert(0, clip); } async fn paste(&self) {