src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts/SettingsEditor2/saveState
class SettingsEditor2:	protected override saveState(): void {
		if (this.isVisible()) {
			const searchQuery = this.searchWidget.getValue().trim();
			const target = this.settingsTargetsWidget.settingsTarget as SettingsTarget;
			if (this.group && this.input) {
				this.editorMemento.saveEditorState(this.group, this.input, { searchQuery, target });
			}
		} else if (this.group && this.input) {
			this.editorMemento.clearEditorState(this.input, this.group);
		}

		super.saveState();
	}