src/vs/platform/terminal/common/capabilities/bufferMarkCapability.ts/BufferMarkCapability/addMark
class BufferMarkCapability:	addMark(properties?: IMarkProperties): void {
		const marker = properties?.marker || this._terminal.registerMarker();
		const id = properties?.id;
		if (!marker) {
			return;
		}
		if (id) {
			this._idToMarkerMap.set(id, marker);
			marker.onDispose(() => this._idToMarkerMap.delete(id));
		} else {
			this._anonymousMarkers.push(marker);
			marker.onDispose(() => this._anonymousMarkers.filter(m => m !== marker));
		}
		this._onMarkAdded.fire({ marker, id, hidden: properties?.hidden, hoverMessage: properties?.hoverMessage });
	}