From bc8147bc866c02a5da50423125af2584ce53dfd4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 20 Sep 2023 10:55:26 +0200 Subject: [PATCH] simplify (#193554) simplufy - suggestison from @rzhao271 --- src/vs/base/browser/ui/icons/iconSelectBox.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); }