src/vs/workbench/browser/parts/editor/textResourceEditor.ts/AbstractTextResourceEditor/saveTextResourceEditorViewState
class AbstractTextResourceEditor:	private saveTextResourceEditorViewState(input: EditorInput | undefined): void {
		if (!(input instanceof UntitledTextEditorInput) && !(input instanceof TextResourceEditorInput)) {
			return; // only enabled for untitled and resource inputs
		}

		const resource = input.resource;

		// Clear view state if input is disposed
		if (input.isDisposed()) {
			super.clearTextEditorViewState(resource);
		}

		// Otherwise save it
		else {
			super.saveTextEditorViewState(resource, input);
		}
	}