src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.ts/NotebookVisibleCellObserver/_updateVisibleCells
class NotebookVisibleCellObserver:	private _updateVisibleCells(): void {
		const vm = this._notebookEditor.viewModel;
		if (!vm) {
			return;
		}

		const rangesWithEnd = this._notebookEditor.visibleRanges
			.map(range => ({ start: range.start, end: range.end + 1 }));
		const newVisibleCells = cellRangesToIndexes(rangesWithEnd)
			.map(index => vm.cellAt(index))
			.filter(isDefined);
		const newVisibleHandles = new Set(newVisibleCells.map(cell => cell.handle));
		const oldVisibleHandles = new Set(this._visibleCells.map(cell => cell.handle));
		const diff = diffSets(oldVisibleHandles, newVisibleHandles);

		const added = diff.added
			.map(handle => vm.getCellByHandle(handle))
			.filter(isDefined);
		const removed = diff.removed
			.map(handle => vm.getCellByHandle(handle))
			.filter(isDefined);

		this._visibleCells = newVisibleCells;
		this._onDidChangeVisibleCells.fire({
			added,
			removed
		});
	}