Skip to content

Commit 563358d

Browse files
committed
Fixes #4127 ensures view is shown
1 parent b8168d7 commit 563358d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2424

2525
- Fixes avoid eagerly getting "full" commit details for inline blame ([#4115])(https://github.com/gitkraken/vscode-gitlens/issues/4115))
2626
- Fixes large commit messages work poorly on Commit Graph ([#4100](https://github.com/gitkraken/vscode-gitlens/issues/4100))
27+
- Fixes _Show \* View_ commands fail intermittently ([#4127](https://github.com/gitkraken/vscode-gitlens/issues/4127))
2728

2829
## [16.3.2] - 2025-02-21
2930

src/views/scmGroupedView.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ export class ScmGroupedView implements Disposable {
3838
type = this.views.scmGroupedViews?.size ? (first(this.views.scmGroupedViews) as T) : undefined!;
3939
}
4040

41-
if (this._view?.type === type) {
42-
this.views.lastSelectedScmGroupedView = type;
43-
return this._view as TreeViewByType[T];
41+
if (this._view?.type !== type) {
42+
this._view?.dispose();
43+
this._view = this.getView(type);
4444
}
4545

46-
this._view?.dispose();
47-
this._view = this.getView(type);
4846
if (focus) {
4947
void this._view.show({ preserveFocus: false });
5048
}

0 commit comments

Comments
 (0)