瀏覽代碼

Fixes back button on search command

main
Eric Amodio 4 年之前
父節點
當前提交
e8f11d9889
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      src/commands/git/search.ts

+ 6
- 1
src/commands/git/search.ts 查看文件

@ -140,6 +140,7 @@ export class SearchGitCommand extends QuickCommand {
// If we skipped the previous step, make sure we back up past it
if (skippedStepOne) {
skippedStepOne = false;
state.counter--;
}
state.pattern = undefined;
@ -341,7 +342,11 @@ export class SearchGitCommand extends QuickCommand {
},
});
const selection: StepSelection<typeof step> = yield step;
if (!QuickCommand.canPickStepContinue(step, state, selection)) return StepResult.Break;
if (!QuickCommand.canPickStepContinue(step, state, selection)) {
// Since we simulated a step above, we need to remove it here
state.counter--;
return StepResult.Break;
}
// Since we simulated a step above, we need to remove it here
state.counter--;

Loading…
取消
儲存