src/vs/workbench/services/history/browser/history.ts/HistoryService/updateContextKeys
class HistoryService:	private updateContextKeys(): void {
		this.contextKeyService.bufferChangeEvents(() => {
			this.canNavigateBackContextKey.set(this.navigationStack.length > 0 && this.navigationStackIndex > 0);
			this.canNavigateForwardContextKey.set(this.navigationStack.length > 0 && this.navigationStackIndex < this.navigationStack.length - 1);
			this.canNavigateToLastEditLocationContextKey.set(!!this.lastEditLocation);
			this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
		});
	}