We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f230ac commit cdfc9ceCopy full SHA for cdfc9ce
src/utils.rs
@@ -1,3 +1,4 @@
1
+use base64::{engine::general_purpose, Engine as _};
2
use copypasta_ext::prelude::*;
3
use copypasta_ext::x11_fork::ClipboardContext;
4
use crossterm::style::Print;
@@ -112,7 +113,10 @@ pub fn copy_string_to_clipboard(content: String) -> Result<CopyType, ()> {
112
113
// Check https://github.com/timvisee/rust-clipboard-ext/blob/371df19d2f961882a21c957f396d1e24548d1f28/src/osc52.rs#L92
114
return match crossterm::execute!(
115
io::stdout(),
- Print(format!("\x1B]52;c;{}\x07", base64::encode(content)))
116
+ Print(format!(
117
+ "\x1B]52;c;{}\x07",
118
+ general_purpose::STANDARD.encode(content)
119
+ ))
120
) {
121
Ok(_) => Ok(CopyType::OSC52),
122
Err(_) => Err(()),
0 commit comments