Skip to content

Commit e529771

Browse files
authored
Merge pull request microsoft#187985 from yshaojun/fix/186206
fix: prevent duplicate reason(microsoft#186206)
2 parents b2c6bfb + c85586f commit e529771

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ export class UnicodeHighlighterHoverParticipant implements IEditorHoverParticipa
429429
}
430430

431431
const result: MarkdownHover[] = [];
432+
const existedReason = new Set<string>();
432433
let index = 300;
433434
for (const d of lineDecorations) {
434435

@@ -480,6 +481,11 @@ export class UnicodeHighlighterHoverParticipant implements IEditorHoverParticipa
480481
break;
481482
}
482483

484+
if (existedReason.has(reason)) {
485+
continue;
486+
}
487+
existedReason.add(reason);
488+
483489
const adjustSettingsArgs: ShowExcludeOptionsArgs = {
484490
codePoint: codePoint,
485491
reason: highlightInfo.reason,

0 commit comments

Comments
 (0)