src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel.ts/NotebookViewModel/_splitPointsToBoundaries
class NotebookViewModel:	private _splitPointsToBoundaries(splitPoints: IPosition[], textBuffer: IReadonlyTextBuffer): IPosition[] | null {
		const boundaries: IPosition[] = [];
		const lineCnt = textBuffer.getLineCount();
		const getLineLen = (lineNumber: number) => {
			return textBuffer.getLineLength(lineNumber);
		};

		// split points need to be sorted
		splitPoints = splitPoints.sort((l, r) => {
			const lineDiff = l.lineNumber - r.lineNumber;
			const columnDiff = l.column - r.column;
			return lineDiff !== 0 ? lineDiff : columnDiff;
		});

		for (let sp of splitPoints) {
			if (getLineLen(sp.lineNumber) + 1 === sp.column && sp.column !== 1 /** empty line */ && sp.lineNumber < lineCnt) {
				sp = new Position(sp.lineNumber + 1, 1);
			}
			this._pushIfAbsent(boundaries, sp);
		}

		if (boundaries.length === 0) {
			return null;
		}

		// boundaries already sorted and not empty
		const modelStart = new Position(1, 1);
		const modelEnd = new Position(lineCnt, getLineLen(lineCnt) + 1);
		return [modelStart, ...boundaries, modelEnd];
	}