headers-vy icon indicating copy to clipboard operation
headers-vy copied to clipboard

[Issue #1] - Fix content not registered in clipboard missing method `get_contents`

Open s3bc40 opened this issue 11 months ago • 0 comments

Related to issue: #1

OS: Ubuntu24

Problem: content does not save into the clipboard. Issue related on rust-clipboard: https://github.com/aweinstock314/rust-clipboard/issues/86#issuecomment-1435955447

Solution: From the discussion, we can add ctx.get_contents().unwrap(); to copy the content to the clipboard. Here is an example from their discussion

use clipboard::ClipboardProvider;
use clipboard::ClipboardContext;

fn main() {
    let mut ctx: ClipboardContext = ClipboardProvider::new().unwrap();
    ctx.set_contents("My name is Pablo".to_owned()).unwrap();
    ctx.get_contents(); --> HERE IS WHAT IS MISSING
}

s3bc40 avatar Jan 10 '25 11:01 s3bc40