diff --git a/src/vs/base/browser/ui/icons/iconSelectBox.ts b/src/vs/base/browser/ui/icons/iconSelectBox.ts index 421893899b1..afc47f018d0 100644 --- a/src/vs/base/browser/ui/icons/iconSelectBox.ts +++ b/src/vs/base/browser/ui/icons/iconSelectBox.ts @@ -223,8 +223,7 @@ export class IconSelectBox extends Disposable { focusNextRow(): void { let nextRowIndex = this.focusedItemIndex + this.numberOfElementsPerRow; if (nextRowIndex >= this.renderedIcons.length) { - nextRowIndex = (nextRowIndex % this.numberOfElementsPerRow) + 1; - nextRowIndex = nextRowIndex === this.numberOfElementsPerRow ? 0 : nextRowIndex; + nextRowIndex = (nextRowIndex + 1) % this.numberOfElementsPerRow; } this.focusIcon(nextRowIndex); }