src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts/TextFileEditor/onWillCloseEditorInGroup
class TextFileEditor:	protected override onWillCloseEditorInGroup(editor: IEditorInput): void {

		// 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 still as needed.
		this.doSaveOrClearTextEditorViewState(editor);
	}