Skip to content
Snippets Groups Projects
Commit 0bb6e249 authored by nightfox's avatar nightfox
Browse files

Bug fix: Off-by-one error when pressing the End key. Now it goes to the correct item.

parent 896886a2
No related branches found
No related tags found
No related merge requests found
......@@ -823,7 +823,7 @@ function DDLightbarMenu_GetVal(pDraw)
else
console.gotoxy(this.pos.x, this.pos.y+this.selectedItemIdx-this.topItemIdx);
this.WriteItem(this.selectedItemIdx, null, false);
this.selectedItemIdx = this.topItemIdx + numItemsPerPage;
this.selectedItemIdx = this.topItemIdx + numItemsPerPage - 1;
if (this.selectedItemIdx >= this.items.length)
this.selectedItemIdx = this.items.length - 1;
// Draw the new current item in selected colors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment