From e2e32dfe0bcff51902c238c40d5b7ff2cad07c4a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 Feb 2016 09:43:01 +0100 Subject: [PATCH] fixes #2847 --- src/vs/base/browser/ui/list/listWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index c25b8739ea1..ea72873bd17 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -245,7 +245,7 @@ export class List implements IDisposable { if (this.length === 0) return; const focus = this.focus.get(); let index = focus.length > 0 ? focus[0] - n : 0; - if (loop && index < 0) index = this.length + (index % this.length); + if (loop && index < 0) index = (this.length + (index % this.length)) % this.length; this.setFocus(Math.max(index, 0)); } -- GitLab