src/vs/workbench/browser/parts/editor/textDiffEditor.ts/TextDiffEditor/doSaveOrClearTextDiffEditorViewState
class TextDiffEditor:	private doSaveOrClearTextDiffEditorViewState(input: IEditorInput | undefined): void {
		if (!(input instanceof DiffEditorInput)) {
			return; // only supported for diff editor inputs
		}

		const resource = this.toDiffEditorViewStateResource(input);
		if (!resource) {
			return; // unable to retrieve input resource
		}

		// Clear view state if input is disposed or we are configured to not storing any state
		if (input.isDisposed() || (!this.shouldRestoreTextEditorViewState(input) && (!this.group || !this.group.contains(input)))) {
			super.clearTextEditorViewState(resource, this.group);
		}

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