From ce64a47714e19ef7bf853856a3fb370e17bea6a5 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 23 Oct 2023 12:56:10 -0400 Subject: [PATCH] Ensures search won't close on focus loss --- src/commands/git/search.ts | 2 ++ src/quickpicks/contributorsPicker.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/git/search.ts b/src/commands/git/search.ts index cc1a0e3..0d80e4e 100644 --- a/src/commands/git/search.ts +++ b/src/commands/git/search.ts @@ -356,6 +356,7 @@ export class SearchGitCommand extends QuickCommand { const step = createPickStep>({ title: appendReposToTitle(context.title, state, context), placeholder: 'e.g. "Updates dependencies" author:eamodio', + ignoreFocusOut: true, matchOnDescription: true, matchOnDetail: true, additionalButtons: [matchCaseButton, matchAllButton, matchRegexButton], @@ -477,6 +478,7 @@ async function updateSearchQuery( { appendReposToTitle: true, clearButton: true, + ignoreFocusOut: true, multiselect: true, picked: c => authors != null && diff --git a/src/quickpicks/contributorsPicker.ts b/src/quickpicks/contributorsPicker.ts index a0a1c3d..633b10a 100644 --- a/src/quickpicks/contributorsPicker.ts +++ b/src/quickpicks/contributorsPicker.ts @@ -19,6 +19,7 @@ export async function showContributorsPicker( options?: { appendReposToTitle?: boolean; clearButton?: boolean; + ignoreFocusOut?: boolean; multiselect?: boolean; picked?: (contributor: GitContributor) => boolean; }, @@ -45,7 +46,7 @@ export async function showContributorsPicker( }), ); - quickpick.ignoreFocusOut = getQuickPickIgnoreFocusOut(); + quickpick.ignoreFocusOut = options?.ignoreFocusOut ?? getQuickPickIgnoreFocusOut(); quickpick.title = options?.appendReposToTitle ? appendRepoToTitle(container, title, repository) : title; quickpick.placeholder = placeholder;