diff --git a/package.json b/package.json index 4cea896..9c66653 100644 --- a/package.json +++ b/package.json @@ -481,6 +481,12 @@ "markdownDescription": "Specifies the style of the gravatar default (fallback) images", "scope": "window" }, + "gitlens.gitCommands.closeOnFocusOut": { + "type": "boolean", + "default": false, + "markdownDescription": "Specifies whether to dismiss the Git Commands menu when focus is lost (if not, press `ESC` to dismiss)", + "scope": "window" + }, "gitlens.gitCommands.skipConfirmations": { "type": "array", "default": [ @@ -526,7 +532,7 @@ "minItems": 0, "maxItems": 14, "uniqueItems": true, - "markdownDescription": "Specifies which Git commands should have their confirmations skipped when executed from a GitLens view", + "markdownDescription": "Specifies which (and when) Git commands will skip the confirmation step, using the format: `git-command-name:(menu|command)`", "scope": "window" }, "gitlens.heatmap.ageThreshold": { @@ -1789,7 +1795,7 @@ "gitlens.advanced.quickPick.closeOnFocusOut": { "type": "boolean", "default": true, - "markdownDescription": "Specifies whether to close QuickPick menus when focus is lost", + "markdownDescription": "Specifies whether to dismiss quick pick menus when focus is lost (if not, press `ESC` to dismiss)", "scope": "window" }, "gitlens.advanced.repositorySearchDepth": { diff --git a/src/commands/gitCommands.ts b/src/commands/gitCommands.ts index a50b221..66e3dfd 100644 --- a/src/commands/gitCommands.ts +++ b/src/commands/gitCommands.ts @@ -157,7 +157,7 @@ export class GitCommandsCommand extends Command { private async showInputStep(step: QuickInputStep, commandsStep: PickCommandStep) { const input = window.createInputBox(); - input.ignoreFocusOut = true; + input.ignoreFocusOut = !configuration.get(configuration.name('gitCommands')('closeOnFocusOut').value); const disposables: Disposable[] = []; @@ -226,7 +226,9 @@ export class GitCommandsCommand extends Command { private async showPickStep(step: QuickPickStep, commandsStep: PickCommandStep) { const quickpick = window.createQuickPick(); - quickpick.ignoreFocusOut = true; + quickpick.ignoreFocusOut = !configuration.get( + configuration.name('gitCommands')('closeOnFocusOut').value + ); const disposables: Disposable[] = []; diff --git a/src/config.ts b/src/config.ts index a301752..a8c45a8 100644 --- a/src/config.ts +++ b/src/config.ts @@ -33,6 +33,7 @@ export interface Config { defaultDateStyle: DateStyle; defaultGravatarsStyle: GravatarDefaultStyle; gitCommands: { + closeOnFocusOut: boolean; skipConfirmations: string[]; }; heatmap: {