Browse Source

Fixes commits disappearing from commit details

main
Keith Daulton 2 years ago
parent
commit
47e132094c
2 changed files with 5 additions and 6 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +4
    -6
      src/webviews/commitDetails/commitDetailsWebviewView.ts

+ 1
- 0
CHANGELOG.md View File

@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixes [#2377](https://github.com/gitkraken/vscode-gitlens/issues/2377) - Missing Azure Devops Icon
- Fixes [#2380](https://github.com/gitkraken/vscode-gitlens/issues/2380) - Autolink fails with curly braces
- Fixes [#2381](https://github.com/gitkraken/vscode-gitlens/issues/2381) - can't use scrollbar in 'Commit Graph' view
- Fixes [#2382](https://github.com/gitkraken/vscode-gitlens/issues/2382) - commits disappearing from commit details view when they shouldn't
- Fixes an issue where focusout hides toolbar actions for the graph
- Fixes an issue where _Switch to Another Branch..._ doesn't work in the Graph editor toolbar
- Fixes graph issue with row highlighting/dimming sticking when the graph loses focus

+ 4
- 6
src/webviews/commitDetails/commitDetailsWebviewView.ts View File

@ -688,18 +688,16 @@ export class CommitDetailsWebviewView extends WebviewViewBase
let commit;
if (window.activeTextEditor == null) {
if (getContext('gitlens:webview:graph:active') || getContext('gitlens:webview:rebaseEditor:active')) {
commit = this._pendingContext?.commit ?? this._context.commit;
if (commit != null) return commit;
}
if (window.activeTextEditor != null) {
const { lineTracker } = this.container;
const line = lineTracker.selections?.[0].active;
if (line != null) {
commit = lineTracker.getState(line)?.commit;
if (commit != null) return commit;
}
} else if (getContext('gitlens:webview:graph:active') || getContext('gitlens:webview:rebaseEditor:active')) {
commit = this._pendingContext?.commit ?? this._context.commit;
if (commit != null) return commit;
}
const { commitsView } = this.container;

Loading…
Cancel
Save