From 6354e14194be97eeb22a418e10fa422f51120939 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Wed, 2 Jul 2025 14:05:22 -0700 Subject: [PATCH] remove 50ms delay feature flag for windows, it's needed on linux too, so just alway do it. --- src-tauri/src/utils.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src-tauri/src/utils.rs b/src-tauri/src/utils.rs index 10b5b92..8917317 100644 --- a/src-tauri/src/utils.rs +++ b/src-tauri/src/utils.rs @@ -54,14 +54,11 @@ pub fn paste(text: String, app_handle: AppHandle) -> Result<(), String> { .write_text(&text) .map_err(|e| format!("Failed to write to clipboard: {}", e))?; - // Add a small delay on Windows to ensure clipboard write is complete - #[cfg(target_os = "windows")] + // small delay to ensure the clipboard content has been written to std::thread::sleep(std::time::Duration::from_millis(50)); send_paste()?; - // Add another small delay before restoring clipboard - #[cfg(target_os = "windows")] std::thread::sleep(std::time::Duration::from_millis(50)); // restore the clipboard