src/vs/base/parts/quickinput/browser/quickInputList.ts/QuickInputList/focus
class QuickInputList:	focus(what: QuickInputListFocus): void {
		if (!this.list.length) {
			return;
		}

		if (what === QuickInputListFocus.Next && this.list.getFocus()[0] === this.list.length - 1) {
			what = QuickInputListFocus.First;
		}

		if (what === QuickInputListFocus.Previous && this.list.getFocus()[0] === 0) {
			what = QuickInputListFocus.Last;
		}

		if (what === QuickInputListFocus.Second && this.list.length < 2) {
			what = QuickInputListFocus.First;
		}

		switch (what) {
			case QuickInputListFocus.First:
				this.list.focusFirst();
				break;
			case QuickInputListFocus.Second:
				this.list.focusNth(1);
				break;
			case QuickInputListFocus.Last:
				this.list.focusLast();
				break;
			case QuickInputListFocus.Next:
				this.list.focusNext();
				break;
			case QuickInputListFocus.Previous:
				this.list.focusPrevious();
				break;
			case QuickInputListFocus.NextPage:
				this.list.focusNextPage();
				break;
			case QuickInputListFocus.PreviousPage:
				this.list.focusPreviousPage();
				break;
		}

		const focused = this.list.getFocus()[0];
		if (typeof focused === 'number') {
			this.list.reveal(focused);
		}
	}