mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 19:03:30 +04:00
Add a nop clipboard provider for wasm
This commit is contained in:
parent
9191af3f8d
commit
ade4cbffaa
@ -75,7 +75,13 @@ pub fn get_clipboard_provider() -> Box<dyn ClipboardProvider> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(any(windows, target_os = "macos")))]
|
#[cfg(target_os = "wasm32")]
|
||||||
|
pub fn get_clipboard_provider() -> Box<dyn ClipboardProvider> {
|
||||||
|
// TODO:
|
||||||
|
Box::new(provider::NopProvider::new())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(any(windows, target_os = "wasm32", target_os = "macos")))]
|
||||||
pub fn get_clipboard_provider() -> Box<dyn ClipboardProvider> {
|
pub fn get_clipboard_provider() -> Box<dyn ClipboardProvider> {
|
||||||
use provider::command::{env_var_is_set, exists, is_exit_success};
|
use provider::command::{env_var_is_set, exists, is_exit_success};
|
||||||
// TODO: support for user-defined provider, probably when we have plugin support by setting a
|
// TODO: support for user-defined provider, probably when we have plugin support by setting a
|
||||||
@ -201,6 +207,7 @@ fn set_contents(&mut self, contents: String, clipboard_type: ClipboardType) -> R
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
pub mod command {
|
pub mod command {
|
||||||
use super::*;
|
use super::*;
|
||||||
use anyhow::{bail, Context as _, Result};
|
use anyhow::{bail, Context as _, Result};
|
||||||
|
Loading…
Reference in New Issue
Block a user