Web: Files: fixed hotkey selectionsUp

This commit is contained in:
Nikita Gopienko 2022-02-09 12:44:23 +03:00
parent fca8a6ddec
commit bb1b31034f

View File

@ -525,16 +525,16 @@ class HotkeyStore {
selectionsUp.push(filesList[prevForTileUpItemIndex]);
prevForTileUpItemIndex++;
}
}
let counterToUp = 0;
if (prevForTileUpIndex > hotkeyCaretStartIndex) {
counterToUp = prevForTileUpIndex - hotkeyCaretStartIndex;
}
let counterToUp = 0;
if (prevForTileUpIndex > hotkeyCaretStartIndex) {
counterToUp = prevForTileUpIndex - hotkeyCaretStartIndex;
}
while (counterToUp !== 0) {
selectionsUp.push(filesList[hotkeyCaretStartIndex + counterToUp]);
counterToUp--;
}
while (counterToUp !== 0) {
selectionsUp.push(filesList[hotkeyCaretStartIndex + counterToUp]);
counterToUp--;
}
}
return selectionsUp;