correct off-by-one

This commit is contained in:
ansuz 2017-05-05 15:40:31 +02:00
parent 3a338e0890
commit 6471b572eb

View File

@ -400,7 +400,7 @@ define([
if (length === 0) { return; }
// List mode
if (getViewMode() === "list") {
if (e.which === 40) { click($elements.get(Math.min(lastIndex+1, length))); }
if (e.which === 40) { click($elements.get(Math.min(lastIndex+1, length -1))); }
if (e.which === 38) { click($elements.get(Math.max(lastIndex-1, 0))); }
return;
}