mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-20 01:35:36 -05:00
Adds support for ranged quick file history
Fixes ranged diffWithPrevious command execution via CodeLens
This commit is contained in:
@@ -81,13 +81,13 @@ export class CommitFileDetailsQuickPick {
|
||||
items.push(new CommandQuickPickItem({
|
||||
label: `$(history) Show File History`,
|
||||
description: `\u00a0 \u2014 \u00a0\u00a0 of ${path.basename(commit.fileName)}`
|
||||
}, Commands.ShowQuickFileHistory, [commit.uri, undefined, currentCommand, fileLog]));
|
||||
}, Commands.ShowQuickFileHistory, [commit.uri, undefined, undefined, currentCommand, fileLog]));
|
||||
}
|
||||
|
||||
items.push(new CommandQuickPickItem({
|
||||
label: `$(history) Show ${workingFileName && options.showFileHistory ? 'Previous ' : ''}File History`,
|
||||
description: `\u00a0 \u2014 \u00a0\u00a0 of ${path.basename(commit.fileName)} \u00a0\u2022\u00a0 starting from \u00a0$(git-commit) ${commit.shortSha}`
|
||||
}, Commands.ShowQuickFileHistory, [new GitUri(commit.uri, commit), undefined, currentCommand]));
|
||||
}, Commands.ShowQuickFileHistory, [new GitUri(commit.uri, commit), undefined, undefined, currentCommand]));
|
||||
|
||||
if (goBackCommand) {
|
||||
items.splice(0, 0, goBackCommand);
|
||||
|
||||
@@ -29,7 +29,7 @@ export class FileHistoryQuickPick {
|
||||
items.splice(0, 0, new CommandQuickPickItem({
|
||||
label: `$(sync) Show All Commits`,
|
||||
description: `\u00a0 \u2014 \u00a0\u00a0 this may take a while`
|
||||
}, Commands.ShowQuickFileHistory, [Uri.file(uri.fsPath), 0, goBackCommand]));
|
||||
}, Commands.ShowQuickFileHistory, [Uri.file(uri.fsPath), undefined, 0, goBackCommand]));
|
||||
|
||||
if (nextPageCommand) {
|
||||
index++;
|
||||
@@ -40,14 +40,14 @@ export class FileHistoryQuickPick {
|
||||
const npc = new CommandQuickPickItem({
|
||||
label: `$(arrow-right) Show Next Commits`,
|
||||
description: `\u00a0 \u2014 \u00a0\u00a0 shows ${log.maxCount} newer commits`
|
||||
}, Commands.ShowQuickFileHistory, [uri, log.maxCount, goBackCommand, undefined, nextPageCommand]);
|
||||
}, Commands.ShowQuickFileHistory, [uri, undefined, log.maxCount, goBackCommand, undefined, nextPageCommand]);
|
||||
|
||||
const last = Iterables.last(log.commits.values());
|
||||
|
||||
previousPageCommand = new CommandQuickPickItem({
|
||||
label: `$(arrow-left) Show Previous Commits`,
|
||||
description: `\u00a0 \u2014 \u00a0\u00a0 shows ${log.maxCount} older commits`
|
||||
}, Commands.ShowQuickFileHistory, [new GitUri(uri, last), log.maxCount, goBackCommand, undefined, npc]);
|
||||
}, Commands.ShowQuickFileHistory, [new GitUri(uri, last), undefined, log.maxCount, goBackCommand, undefined, npc]);
|
||||
|
||||
index++;
|
||||
items.splice(0, 0, previousPageCommand);
|
||||
@@ -66,7 +66,7 @@ export class FileHistoryQuickPick {
|
||||
new CommandQuickPickItem({
|
||||
label: `go back \u21A9`,
|
||||
description: `\u00a0 \u2014 \u00a0\u00a0 to history of \u00a0$(file-text) ${path.basename(uri.fsPath)}`
|
||||
}, Commands.ShowQuickFileHistory, [uri, log.maxCount, undefined, log])
|
||||
}, Commands.ShowQuickFileHistory, [uri, undefined, log.maxCount, undefined, log])
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user