mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-22 01:35:38 -05:00
Fixes issue where repo change wasn't fired in some cases
Consolidates repo watching into a single watcher Adds debounce to repo changes in the custom view
This commit is contained in:
@@ -47,10 +47,11 @@ export class GitExplorer implements TreeDataProvider<ExplorerNode> {
|
||||
commands.registerCommand('gitlens.gitExplorer.openChangedFileRevisions', this.openChangedFileRevisions, this);
|
||||
commands.registerCommand('gitlens.gitExplorer.applyChanges', this.applyChanges, this);
|
||||
|
||||
context.subscriptions.push(this.git.onDidChangeRepo(this.onRepoChanged, this));
|
||||
const repoChangedFn = Functions.debounce(this.onRepoChanged, 250);
|
||||
context.subscriptions.push(this.git.onDidChangeRepo(repoChangedFn, this));
|
||||
|
||||
const fn = Functions.debounce(this.onActiveEditorChanged, 500);
|
||||
context.subscriptions.push(window.onDidChangeActiveTextEditor(fn, this));
|
||||
const editorChangedFn = Functions.debounce(this.onActiveEditorChanged, 500);
|
||||
context.subscriptions.push(window.onDidChangeActiveTextEditor(editorChangedFn, this));
|
||||
context.subscriptions.push(workspace.onDidChangeConfiguration(this.onConfigurationChanged, this));
|
||||
|
||||
this.onConfigurationChanged();
|
||||
|
||||
Reference in New Issue
Block a user