mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 11:10:48 +00:00
Fix #26425
This commit is contained in:
parent
2e6df245d2
commit
c1ae18fad7
2 changed files with 6 additions and 2 deletions
|
@ -577,7 +577,7 @@
|
|||
},
|
||||
{
|
||||
"command": "git.openChange",
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourcePath in git.changedResources"
|
||||
},
|
||||
{
|
||||
"command": "git.stage",
|
||||
|
@ -1324,7 +1324,7 @@
|
|||
{
|
||||
"command": "git.openChange",
|
||||
"group": "navigation",
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file"
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file && resourcePath in git.changedResources"
|
||||
},
|
||||
{
|
||||
"command": "git.stageSelectedRanges",
|
||||
|
|
|
@ -1847,6 +1847,7 @@ export class Repository implements Disposable {
|
|||
this._submodules = submodules!;
|
||||
this.rebaseCommit = rebaseCommit;
|
||||
|
||||
|
||||
const untrackedChanges = scopedConfig.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
const index: Resource[] = [];
|
||||
const workingTree: Resource[] = [];
|
||||
|
@ -1905,6 +1906,9 @@ export class Repository implements Disposable {
|
|||
// set count badge
|
||||
this.setCountBadge();
|
||||
|
||||
// Update context key with changed resources
|
||||
commands.executeCommand('setContext', 'git.changedResources', workingTree.map(r => r.resourceUri.fsPath.toString()));
|
||||
|
||||
this._onDidChangeStatus.fire();
|
||||
|
||||
this._sourceControl.commitTemplate = await this.getInputTemplate();
|
||||
|
|
Loading…
Reference in a new issue