src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.ts/CommentThreadRangeDecorator/update
class CommentThreadRangeDecorator:	public update(editor: ICodeEditor, commentInfos: ICommentInfo[]) {
		const model = editor.getModel();
		if (!model) {
			return;
		}
		dispose(this.threadCollapseStateListeners);
		this.editor = editor;

		const commentThreadRangeDecorations: CommentThreadRangeDecoration[] = [];
		for (const info of commentInfos) {
			info.threads.forEach(thread => {
				if (thread.isDisposed) {
					return;
				}

				const range = thread.range;
				// We only want to show a range decoration when there's the range spans either multiple lines
				// or, when is spans multiple characters on the sample line
				if ((range.startLineNumber === range.endLineNumber) && (range.startColumn === range.endColumn)) {
					return;
				}

				this.threadCollapseStateListeners.push(thread.onDidChangeCollapsibleState(() => {
					this.update(editor, commentInfos);
				}));

				if (thread.collapsibleState === CommentThreadCollapsibleState.Collapsed) {
					return;
				}

				commentThreadRangeDecorations.push(new CommentThreadRangeDecoration(range, this.decorationOptions));
			});
		}

		editor.changeDecorations((changeAccessor) => {
			this.decorationIds = changeAccessor.deltaDecorations(this.decorationIds, commentThreadRangeDecorations);
			commentThreadRangeDecorations.forEach((decoration, index) => decoration.id = this.decorationIds[index]);
		});
	}