diff --git a/lapce-proxy/src/dispatch.rs b/lapce-proxy/src/dispatch.rs index 6a06d50f..3f9e94a8 100644 --- a/lapce-proxy/src/dispatch.rs +++ b/lapce-proxy/src/dispatch.rs @@ -1266,8 +1266,19 @@ fn handle_fs_events(&self, events: Vec<(WatchToken, notify::Event)>) { } fn handle_open_file_fs_event(&self, event: notify::Event) { + const PREFIX: &str = r"\\?\"; if event.kind.is_modify() { for path in event.paths { + #[cfg(windows)] + if let Some(path_str) = path.to_str() { + if path_str.starts_with(PREFIX) { + let path = PathBuf::from(&path_str[PREFIX.len()..]); + self.proxy_rpc.notification( + ProxyNotification::OpenFileChanged { path }, + ); + continue; + } + } self.proxy_rpc .notification(ProxyNotification::OpenFileChanged { path }); }