Skip to content

Commit 9f6b715

Browse files
authored
"Go to Next Diff in Pull Request" command error (#6563)
* "Go to Next Diff in Pull Request" command fails with error Fixes #6237 * Switch to info message
1 parent 866c62b commit 9f6b715

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/commands.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ ${contents}
15361536
}
15371537

15381538
const editorUri = editor.document.uri;
1539-
if (input.original.scheme !== Schemes.Review) {
1539+
if ((input.original.scheme !== Schemes.Review) && (input.original.scheme !== Schemes.Pr)) {
15401540
return vscode.window.showErrorMessage(vscode.l10n.t('Current file isn\'t a pull request diff.'));
15411541
}
15421542

@@ -1559,6 +1559,10 @@ ${contents}
15591559
}
15601560
}
15611561

1562+
if (input.original.scheme === Schemes.Pr) {
1563+
return vscode.window.showInformationMessage(vscode.l10n.t('No more diffs in this file. Check out the pull request to use this command across files.'));
1564+
}
1565+
15621566
// There is no new range to reveal, time to go to the next file.
15631567
const folderManager = reposManager.getManagerForFile(editorUri);
15641568
if (!folderManager) {

0 commit comments

Comments
 (0)