Skip to content

Commit d5dc23b

Browse files
authored
SCM - fix issue with refreshing status bar commands (microsoft#262949)
1 parent 9f14b08 commit d5dc23b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/vs/workbench/contrib/scm/browser/activity.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export class SCMActiveRepositoryController extends Disposable implements IWorkbe
112112

113113
this._register(autorunWithStore((reader, store) => {
114114
this.logService.trace('[SCMActiveRepositoryController][updateStatusBarAutorun] start');
115-
this._repositories.read(reader);
116115
const repository = this.scmViewService.activeRepository.read(reader);
117116
const commands = repository?.provider.statusBarCommands.read(reader);
118117

src/vs/workbench/contrib/scm/browser/scmViewService.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ export class SCMViewService implements ISCMViewService {
387387
this.focus(this.visibleRepositories[0]);
388388
}
389389

390+
// Check if the last repository was removed
391+
if (removed.length === 1 && this._repositories.length === 0) {
392+
this._onDidFocusRepository.fire(undefined);
393+
}
394+
390395
// Check if the pinned repository was removed
391396
if (removed.length === 1 && removed[0].repository === this._activeRepositoryPinnedObs.get()) {
392397
this._activeRepositoryPinnedObs.set(undefined, undefined);

0 commit comments

Comments
 (0)