Skip to content

Commit 5cb0fd8

Browse files
committed
fix: enable osc52 by default
1 parent fc66dc7 commit 5cb0fd8

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/clip.rs

+16-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,25 @@ impl Selection {
2727
}
2828
}
2929

30-
#[derive(Clone, Default, Serialize, Deserialize)]
30+
#[derive(Clone, Serialize, Deserialize)]
3131
pub struct ClipboardConfig {
3232
pub cmd: Option<String>,
3333
pub shell_cmd: Option<String>,
3434
pub osc52: bool,
3535
pub selection: Option<OneOrMany<Selection>>,
3636
}
3737

38+
impl Default for ClipboardConfig {
39+
fn default() -> Self {
40+
Self {
41+
cmd: None,
42+
shell_cmd: None,
43+
osc52: true,
44+
selection: None,
45+
}
46+
}
47+
}
48+
3849
pub struct ClipboardManager {
3950
#[cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))]
4051
clipboard: Option<Clipboard>,
@@ -115,7 +126,10 @@ impl ClipboardManager {
115126
None => Err("The clipboard is not loaded".to_owned()),
116127
}
117128
#[cfg(not(any(target_os = "linux", target_os = "windows", target_os = "macos")))]
118-
Err("The clipboard is not loaded".to_owned())
129+
Err(
130+
"There is no native clipboard support on android\nEnable osc52 for clipboard support"
131+
.to_owned(),
132+
)
119133
}
120134

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

0 commit comments

Comments
 (0)