src/vs/workbench/browser/parts/editor/editorWithViewState.ts/AbstractEditorWithViewState/onWillCloseEditor
class AbstractEditorWithViewState:	private onWillCloseEditor(e: IEditorCloseEvent): void {
		const editor = e.editor;
		if (editor === this.input) {
			// React to editors closing to preserve or clear view state. This needs to happen
			// in the `onWillCloseEditor` because at that time the editor has not yet
			// been disposed and we can safely persist the view state.
			this.updateEditorViewState(editor);
		}
	}