Skip to content

Commit 76ee2bc

Browse files
committed
Fixes unable to go back after show all
1 parent 9dc6e29 commit 76ee2bc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/commands/showCommitSearch.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,18 @@ export class ShowCommitSearchCommand extends ActiveEditorCachedCommand {
119119

120120
if (progressCancellation.token.isCancellationRequested) return undefined;
121121

122+
const goBackCommand = args.goBackCommand || new CommandQuickPickItem({
123+
label: `go back ${GlyphChars.ArrowBack}`,
124+
description: `${Strings.pad(GlyphChars.Dash, 2, 3)} to commit search`
125+
}, Commands.ShowCommitSearch, [uri, originalArgs]);
126+
122127
const pick = await CommitsQuickPick.show(this.git, log, searchLabel!, progressCancellation, {
123-
goBackCommand: new CommandQuickPickItem({
124-
label: `go back ${GlyphChars.ArrowBack}`,
125-
description: `${Strings.pad(GlyphChars.Dash, 2, 3)} to commit search`
126-
}, Commands.ShowCommitSearch, [uri, originalArgs]),
128+
goBackCommand: goBackCommand,
127129
showAllCommand: log !== undefined && log.truncated
128130
? new CommandQuickPickItem({
129131
label: `$(sync) Show All Commits`,
130132
description: `${Strings.pad(GlyphChars.Dash, 2, 3)} this may take a while`
131-
}, Commands.ShowCommitSearch, [uri, { ...args, maxCount: 0 }])
133+
}, Commands.ShowCommitSearch, [uri, { ...args, maxCount: 0, goBackCommand: goBackCommand }])
132134
: undefined,
133135
showInResultsExplorerCommand: log !== undefined
134136
? new ShowCommitsSearchInResultsQuickPickItem(log, searchLabel!)

0 commit comments

Comments
 (0)