Skip to content

Commit d2f770b

Browse files
committed
got workspace events working
1 parent a7d2afb commit d2f770b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/svnSCM.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,22 @@ function svnSCM() {
2121
this.changes.hideWhenEmpty = true;
2222
this.notTracked.hideWhenEmpty = true;
2323

24-
this.watcher.onDidChange(this.update);
25-
this.watcher.onDidCreate(this.update);
26-
this.watcher.onDidDelete(this.update);
27-
24+
this.addEventListeners();
2825
this.update();
2926
}
3027

28+
svnSCM.prototype.addEventListeners = function() {
29+
this.watcher.onDidChange(() => {
30+
this.update();
31+
});
32+
this.watcher.onDidCreate(() => {
33+
this.update();
34+
});
35+
this.watcher.onDidDelete(() => {
36+
this.update();
37+
});
38+
};
39+
3140
svnSCM.prototype.provideOriginalResource = uri => {
3241
if (uri.scheme !== "file") {
3342
return;

0 commit comments

Comments
 (0)