File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/cursorless-vscode/src/ide/vscode Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { Disposable , FileSystem , PathChangeListener } from "@cursorless/common" ;
2
+ import * as vscode from "vscode" ;
2
3
import { RelativePattern , Uri , workspace } from "vscode" ;
3
4
4
5
export class VscodeFileSystem implements FileSystem {
@@ -7,9 +8,12 @@ export class VscodeFileSystem implements FileSystem {
7
8
const watcher = workspace . createFileSystemWatcher (
8
9
new RelativePattern ( Uri . file ( path ) , "**" ) ,
9
10
) ;
10
- watcher . onDidChange ( onDidChange ) ;
11
- watcher . onDidCreate ( onDidChange ) ;
12
- watcher . onDidDelete ( onDidChange ) ;
13
- return watcher ;
11
+
12
+ return vscode . Disposable . from (
13
+ watcher ,
14
+ watcher . onDidChange ( onDidChange ) ,
15
+ watcher . onDidCreate ( onDidChange ) ,
16
+ watcher . onDidDelete ( onDidChange ) ,
17
+ ) ;
14
18
}
15
19
}
You can’t perform that action at this time.
0 commit comments