diff --git a/package.json b/package.json index 7df545f..2fde8ff 100644 --- a/package.json +++ b/package.json @@ -7545,21 +7545,21 @@ { "id": "gitlens.views.repositories", "name": "Repositories", - "when": "gitlens:enabled && config.gitlens.views.repositories.enabled", + "when": "!gitlens:disabled && config.gitlens.views.repositories.enabled", "contextualTitle": "GitLens", "icon": "images/views/repositories.svg" }, { "id": "gitlens.views.commits", "name": "Commits", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/commits.svg" }, { "id": "gitlens.views.fileHistory", "name": "File History", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/history.svg" }, @@ -7574,14 +7574,14 @@ { "id": "gitlens.views.branches", "name": "Branches", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/branches.svg" }, { "id": "gitlens.views.remotes", "name": "Remotes", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/remotes.svg", "visibility": "collapsed" @@ -7589,7 +7589,7 @@ { "id": "gitlens.views.stashes", "name": "Stashes", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/stashes.svg", "visibility": "collapsed" @@ -7597,7 +7597,7 @@ { "id": "gitlens.views.tags", "name": "Tags", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/tags.svg", "visibility": "collapsed" @@ -7605,7 +7605,7 @@ { "id": "gitlens.views.contributors", "name": "Contributors", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/contributors.svg", "visibility": "collapsed" @@ -7613,7 +7613,7 @@ { "id": "gitlens.views.search", "name": "Search Commits", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/search.svg", "visibility": "collapsed" @@ -7621,7 +7621,7 @@ { "id": "gitlens.views.compare", "name": "Compare Commits", - "when": "gitlens:enabled", + "when": "!gitlens:disabled", "contextualTitle": "GitLens", "icon": "images/views/compare.svg", "visibility": "collapsed" diff --git a/src/constants.ts b/src/constants.ts index cce601b..5186366 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -34,6 +34,7 @@ export enum CommandContext { ActiveFileStatus = 'gitlens:activeFileStatus', AnnotationStatus = 'gitlens:annotationStatus', CanToggleCodeLens = 'gitlens:canToggleCodeLens', + Disabled = 'gitlens:disabled', Enabled = 'gitlens:enabled', HasRemotes = 'gitlens:hasRemotes', Key = 'gitlens:key', diff --git a/src/extension.ts b/src/extension.ts index a05b7cf..f8fc054 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -44,6 +44,7 @@ export async function activate(context: ExtensionContext) { if (!enabled) { Logger.log(`GitLens (v${gitlensVersion}) was NOT activated -- "git.enabled": false`); void setCommandContext(CommandContext.Enabled, false); + void setCommandContext(CommandContext.Disabled, true); void Messages.showGitDisabledErrorMessage();