src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts/CodeCellViewModel/estimateEditorHeight
class CodeCellViewModel:	private estimateEditorHeight(lineHeight: number | undefined = 20): number {
		let hasScrolling = false;
		if (this.layoutInfo.fontInfo) {
			for (let i = 0; i < this.lineCount; i++) {
				const max = this.textBuffer.getLineLastNonWhitespaceColumn(i + 1);
				const estimatedWidth = max * (this.layoutInfo.fontInfo.typicalHalfwidthCharacterWidth + this.layoutInfo.fontInfo.letterSpacing);
				if (estimatedWidth > this.layoutInfo.editorWidth) {
					hasScrolling = true;
					break;
				}
			}
		}

		const verticalScrollbarHeight = hasScrolling ? 12 : 0; // take zoom level into account
		const editorPadding = this.viewContext.notebookOptions.computeEditorPadding(this.internalMetadata);
		return this.lineCount * lineHeight
			+ editorPadding.top
			+ editorPadding.bottom // EDITOR_BOTTOM_PADDING
			+ verticalScrollbarHeight;
	}