fix: Some file watching related vfs fixes

This commit is contained in:
Lukas Wirth 2024-03-21 20:34:55 +01:00
parent cd8eb0fe6d
commit 23613a9de7
4 changed files with 46 additions and 12 deletions

View file

@ -241,7 +241,7 @@ pub(crate) fn handle_did_change_watched_files(
state: &mut GlobalState,
params: DidChangeWatchedFilesParams,
) -> anyhow::Result<()> {
for change in params.changes {
for change in params.changes.iter().unique_by(|&it| &it.uri) {
if let Ok(path) = from_proto::abs_path(&change.uri) {
state.loader.handle.invalidate(path);
}