diff options
| -rw-r--r-- | src/clipboard_store.rs | 6 | ||||
| -rw-r--r-- | src/main.rs | 3 | 
2 files changed, 4 insertions, 5 deletions
| diff --git a/src/clipboard_store.rs b/src/clipboard_store.rs index d334dd6..a7be4f2 100644 --- a/src/clipboard_store.rs +++ b/src/clipboard_store.rs @@ -21,14 +21,14 @@ impl ClipboardStore {          )      } +    /// Set the contents of the system clipboard. Stores the original contents +    /// of the clipboard the first time the function is run.      pub fn set_contents(&mut self, data: String) -> Result<(), Box<Error>> {          if self.original.is_empty() {              self.original = try!(self.context.get_contents())          } -        // Set new clipboard contents -        // self.context.set_contents(data) -        Ok(()) +        self.context.set_contents(data)      }      pub fn reset() { diff --git a/src/main.rs b/src/main.rs index f499809..c3a4b32 100644 --- a/src/main.rs +++ b/src/main.rs @@ -157,8 +157,7 @@ fn main() {                      move_selection(&mut term, &mut selection, knockout_cell, options.len() + 1)                  }                  '\x0D' => { -                    clipboard_store.set_contents(strip_key(&options[selection.y - 2]).to_owned()); -                    match clipboard_ctx.set_contents(strip_key(&options[selection.y - 2]).to_owned()) { +                    match clipboard_store.set_contents(strip_key(&options[selection.y - 2]).to_owned()) {                          Ok(_) => {                              term.printline_with_cell(selection.x, selection.y, "->", green_cell);                          }, | 
