Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
ClipboardReadFindText.rs

1//! Wire method: `nativeHost:readClipboardFindText`.
2//! macOS has a separate find pasteboard; reuse the general clipboard for
3//! parity with VS Code on Linux/Windows.
4
5use serde_json::{Value, json};
6
7pub async fn Fn(_Arguments:Vec<Value>) -> Result<Value, String> {
8	match arboard::Clipboard::new() {
9		Ok(mut Cb) => Ok(json!(Cb.get_text().unwrap_or_default())),
10
11		Err(_) => Ok(json!("")),
12	}
13}