src/vs/workbench/services/history/browser/history.ts/HistoryService/removeExcludedFromHistory
class HistoryService:	private removeExcludedFromHistory(): void {
		this.ensureHistoryLoaded(this.history);

		this.history = this.history.filter(e => {
			const include = this.includeInHistory(e);

			// Cleanup any listeners associated with the input when removing from history
			if (!include) {
				this.clearOnEditorDispose(e, this.editorHistoryListeners);
			}

			return include;
		});
	}