listen for clipboard
This commit is contained in:
parent
54863c2577
commit
ea7905fa8e
10
src/main.rs
10
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) {
|
||||
|
|
Loading…
Reference in a new issue