Skip to content

Commit

Permalink
Extension asks for commenting ranges on a file that got deleted in PR (
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Jun 19, 2024
1 parent 3c9fec5 commit 37fd154
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/view/reviewCommentController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ export class ReviewCommentController extends CommentControllerBase
private updateResourcesWithCommentingRanges(): void {
// only prefetch for small PRs
if (this._folderRepoManager.activePullRequest && this._folderRepoManager.activePullRequest.fileChanges.size < 30) {
for (const file of (this._folderRepoManager.activePullRequest?.fileChanges.keys() ?? [])) {
const uri = vscode.Uri.joinPath(this._folderRepoManager.repository.rootUri, file);
vscode.workspace.openTextDocument(uri);
for (const [file, change] of (this._folderRepoManager.activePullRequest?.fileChanges.entries() ?? [])) {
if (change.status !== GitChangeType.DELETE) {
const uri = vscode.Uri.joinPath(this._folderRepoManager.repository.rootUri, file);
vscode.workspace.openTextDocument(uri);
}
}
}
}
Expand Down

0 comments on commit 37fd154

Please sign in to comment.