Skip to content

Commit 76d7d37

Browse files
Delete yaml from files watched by bundle autocomplete, when the yaml is deleted (#931)
## Changes Fixes #922 (comment) ## Tests <!-- How is this tested? -->
1 parent 157fb6f commit 76d7d37

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/databricks-vscode/src/bundle/bundleAutocompleteProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ export async function registerBundleAutocompleteProvider(
3333
bundleFileList.push(e);
3434
}),
3535
bundleWatcher.onDidDelete(async (e) => {
36-
bundleFileList.push(e);
36+
const idx = bundleFileList.findIndex(
37+
(v) => v.fsPath === e.fsPath
38+
);
39+
if (idx !== -1) {
40+
bundleFileList.splice(idx, 1);
41+
}
3742
})
3843
);
3944
redHatYamlSchemaApi.registerContributor(

0 commit comments

Comments
 (0)