Skip to content

Commit

Permalink
fix: enable osc52 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Beastwick18 committed Aug 14, 2024
1 parent fc66dc7 commit 5cb0fd8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/clip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,25 @@ impl Selection {
}
}

#[derive(Clone, Default, Serialize, Deserialize)]
#[derive(Clone, Serialize, Deserialize)]
pub struct ClipboardConfig {
pub cmd: Option<String>,
pub shell_cmd: Option<String>,
pub osc52: bool,
pub selection: Option<OneOrMany<Selection>>,
}

impl Default for ClipboardConfig {
fn default() -> Self {
Self {
cmd: None,
shell_cmd: None,
osc52: true,
selection: None,
}
}
}

pub struct ClipboardManager {
#[cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))]
clipboard: Option<Clipboard>,
Expand Down Expand Up @@ -115,7 +126,10 @@ impl ClipboardManager {
None => Err("The clipboard is not loaded".to_owned()),
}
#[cfg(not(any(target_os = "linux", target_os = "windows", target_os = "macos")))]
Err("The clipboard is not loaded".to_owned())
Err(
"There is no native clipboard support on android\nEnable osc52 for clipboard support"
.to_owned(),
)
}

#[cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))]
Expand Down

0 comments on commit 5cb0fd8

Please sign in to comment.