src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts/LineNumbersOverlay/prepareRender
class LineNumbersOverlay:	public prepareRender(ctx: RenderingContext): void {
		if (this._renderLineNumbers === RenderLineNumbersType.Off) {
			this._renderResult = null;
			return;
		}

		const lineHeightClassName = (platform.isLinux ? (this._lineHeight % 2 === 0 ? ' lh-even' : ' lh-odd') : '');
		const visibleStartLineNumber = ctx.visibleRange.startLineNumber;
		const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
		const common = '<div class="' + LineNumbersOverlay.CLASS_NAME + lineHeightClassName + '" style="left:' + this._lineNumbersLeft + 'px;width:' + this._lineNumbersWidth + 'px;">';

		const lineCount = this._context.viewModel.getLineCount();
		const output: string[] = [];
		for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
			const lineIndex = lineNumber - visibleStartLineNumber;

			if (!this._renderFinalNewline) {
				if (lineNumber === lineCount && this._context.viewModel.getLineLength(lineNumber) === 0) {
					// Do not render last (empty) line
					output[lineIndex] = '';
					continue;
				}
			}

			const renderLineNumber = this._getLineRenderLineNumber(lineNumber);

			if (renderLineNumber) {
				if (lineNumber === this._activeLineNumber) {
					output[lineIndex] = (
						'<div class="active-line-number ' + LineNumbersOverlay.CLASS_NAME + lineHeightClassName + '" style="left:' + this._lineNumbersLeft + 'px;width:' + this._lineNumbersWidth + 'px;">'
						+ renderLineNumber
						+ '</div>'
					);
				} else {
					output[lineIndex] = (
						common
						+ renderLineNumber
						+ '</div>'
					);
				}
			} else {
				output[lineIndex] = '';
			}
		}

		this._renderResult = output;
	}