Change:
<!-- Do you have a question? Please ask it on --VSCode Version: 1.12.1 OS Version: OS X EI Capitan 10.11.3 Steps to Reproduce: some project from GitHub. a file A.cs which has no fresh changes at all. on the editor of A.cs, and notice the button of on the top right corner above the editor doesn't display as disbled! Clicking it has no effect of course, but it should display as disable in this case just like what in the old versions.
Can't fix without , closing for now.
since it connot be fixed without , should this be kept open and linked to then?
Sure.
To keep the number of issues in our inbox on a manageable level, we're closing issues that have been on the backlog for a long time but haven't gained traction: We look at the number of votes the issue has received and the number of duplicates issues filed. Thanks for your understanding. Happy coding!
Hoping to re-open this because I got this as a feedback item from a few CS educators. They notice their students clicking it accidentally and being confused when there is no apparent action.
I think this has regressed, I now miss this button when a file is staged.
Fixed regression with
There is another regression (), so I will be reverting this fix for this, and will refactor it.

Discussion:
"command": "git.openChange", "title": "%command.openChange%", "category": "Git", <del> "icon": "$(compare-changes)" </del> <ins> "icon": "$(compare-changes)", "enablement": "scmActiveResourceHasChanges" </ins> }, { "command": "git.openAllChanges",

import { VIEW_PANE_ID, ISCMService, ISCMRepository, ISCMViewService } from 'vs/workbench/contrib/scm/common/scm'; import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; <del> import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; </del> <ins> import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; </ins> import { IStatusbarService, StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/workbench/services/statusbar/browser/statusbar'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { EditorResourceAccessor } from 'vs/workbench/common/editor'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { stripIcons } from 'vs/base/common/iconLabels'; <ins> import { Schemas } from 'vs/base/common/network'; </ins> function getCount(repository: ISCMRepository): number { if (typeof repository.provider.count === 'number') {

this.repositoryDisposables.clear(); } } <ins> export class SCMActiveResourceContextKeyController implements IWorkbenchContribution { private contextKey: IContextKey<boolean>; private disposables = new DisposableStore(); private repositoryDisposables = new Set<IDisposable>(); constructor( @IContextKeyService readonly contextKeyService: IContextKeyService, @IEditorService private readonly editorService: IEditorService, @ISCMService private readonly scmService: ISCMService, @IUriIdentityService private readonly uriIdentityService: IUriIdentityService ) { this.contextKey = contextKeyService.createKey('scmActiveResourceHasChanges', false); this.scmService.onDidAddRepository(this.onDidAddRepository, this, this.disposables); for (const repository of this.scmService.repositories) { this.onDidAddRepository(repository); } editorService.onDidActiveEditorChange(this.updateContextKey, this, this.disposables); } private onDidAddRepository(repository: ISCMRepository): void { const onDidChange = Event.any(repository.provider.onDidChange, repository.provider.onDidChangeResources); const changeDisposable = onDidChange(() => this.updateContextKey()); const onDidRemove = Event.filter(this.scmService.onDidRemoveRepository, e => e === repository); const removeDisposable = onDidRemove(() => { disposable.dispose(); this.repositoryDisposables.delete(disposable); this.updateContextKey(); }); const disposable = combinedDisposable(changeDisposable, removeDisposable); this.repositoryDisposables.add(disposable); } private updateContextKey(): void { const activeResource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor); if (activeResource && activeResource.scheme === Schemas.file) { for (const repository of this.scmService.repositories) { for (const resourceGroup of repository.provider.groups.elements) { if (resourceGroup.elements.find(scmResource => { return this.uriIdentityService.extUri.isEqual(activeResource, scmResource.sourceUri); })) { this.contextKey.set(true); return; } } } } this.contextKey.set(false); } dispose(): void { this.disposables = dispose(this.disposables); dispose(this.repositoryDisposables.values()); this.repositoryDisposables.clear(); } } </ins>

import { VIEWLET_ID, ISCMRepository, ISCMService, VIEW_PANE_ID, ISCMProvider, ISCMViewService, REPOSITORIES_VIEW_PANE_ID } from 'vs/workbench/contrib/scm/common/scm'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; <del> import { SCMStatusController } from './activity'; </del> <ins> import { SCMActiveResourceContextKeyController, SCMStatusController } from './activity'; </ins> import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';

}], viewContainer); Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench) <ins> .registerWorkbenchContribution(SCMActiveResourceContextKeyController, LifecyclePhase.Restored); Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench) </ins> .registerWorkbenchContribution(SCMStatusController, LifecyclePhase.Restored); Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({