Only keep one pending comment per location for continue on (#193555)

This commit is contained in:
Alex Ross
2023-09-20 10:56:37 +02:00
committed by GitHub
parent bc8147bc86
commit 333c4e687d

View File

@@ -430,7 +430,7 @@ export class CommentService extends Disposable implements ICommentService {
changedOwners.add(pendingComment.owner);
} else {
const commentsForOwner = this._continueOnComments.get(pendingComment.owner)!;
if (commentsForOwner.every(comment => (comment.uri.toString() !== pendingComment.uri.toString()) || !Range.equalsRange(comment.range, pendingComment.range) || (comment.body !== pendingComment.body))) {
if (commentsForOwner.every(comment => (comment.uri.toString() !== pendingComment.uri.toString()) || !Range.equalsRange(comment.range, pendingComment.range))) {
commentsForOwner.push(pendingComment);
changedOwners.add(pendingComment.owner);
}