src/vs/base/common/history.ts/HistoryNavigator2/add
class HistoryNavigator2:	add(value: T): void {
		const node: HistoryNode<T> = {
			value,
			previous: this.tail,
			next: undefined
		};

		this.tail.next = node;
		this.tail = node;
		this.cursor = this.tail;
		this.size++;

		while (this.size > this.capacity) {
			this.head = this.head.next!;
			this.head.previous = undefined;
			this.size--;
		}
	}