|
|
@ -107,6 +107,8 @@ export class SearchGitCommand extends QuickCommand { |
|
|
|
state.showResultsInView = cfg.showResultsInView; |
|
|
|
} |
|
|
|
|
|
|
|
let skippedStepOne = false; |
|
|
|
|
|
|
|
while (this.canStepsContinue(state)) { |
|
|
|
context.title = this.title; |
|
|
|
|
|
|
@ -116,8 +118,10 @@ export class SearchGitCommand extends QuickCommand { |
|
|
|
typeof state.repo === 'string' || |
|
|
|
!context.repos.includes(state.repo) |
|
|
|
) { |
|
|
|
skippedStepOne = false; |
|
|
|
if (context.repos.length === 1) { |
|
|
|
if (state.repo == null) { |
|
|
|
skippedStepOne = true; |
|
|
|
state.counter++; |
|
|
|
} |
|
|
|
state.repo = context.repos[0]; |
|
|
@ -134,8 +138,8 @@ export class SearchGitCommand extends QuickCommand { |
|
|
|
const result = yield* this.pickSearchOperatorStep(state as SearchStepState, context); |
|
|
|
if (result === StepResult.Break) { |
|
|
|
// If we skipped the previous step, make sure we back up past it
|
|
|
|
if (context.repos.length === 1) { |
|
|
|
state.counter--; |
|
|
|
if (skippedStepOne) { |
|
|
|
skippedStepOne = false; |
|
|
|
} |
|
|
|
|
|
|
|
state.pattern = undefined; |
|
|
|