We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 042cc89 commit 11969fcCopy full SHA for 11969fc
1 file changed
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
@@ -401,12 +401,13 @@ class WordHighlighter {
401
private renderDecorations(): void {
402
this.renderDecorationsTimer = -1;
403
let decorations: IModelDeltaDecoration[] = [];
404
- for (let i = 0, len = this.workerRequestValue.length; i < len; i++) {
405
- let info = this.workerRequestValue[i];
406
- decorations.push({
407
- range: info.range,
408
- options: WordHighlighter._getDecorationOptions(info.kind)
409
- });
+ for (const info of this.workerRequestValue) {
+ if (info.range) {
+ decorations.push({
+ range: info.range,
+ options: WordHighlighter._getDecorationOptions(info.kind)
+ });
410
+ }
411
}
412
413
this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations);
0 commit comments