Skip to content

Commit

Permalink
fix - Fixed off-by-one indexing on find
Browse files Browse the repository at this point in the history
---

We've fixed the selection being incorrect in infobox selections after finding an entry.

---

Type: fix
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Apr 23, 2024
1 parent 6507cfc commit 822e12b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Terminaux/Inputs/Styles/Infobox/InfoBoxSelectionColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ void UpdatePositionBasedOnMouse(PointerEventContext mouse)
if (answer < 0)
break;
var resultIdx = int.Parse(resultEntries[answer].Item1);
currentSelection = resultIdx;
currentSelection = resultIdx - 1;
}
else
InfoBoxColor.WriteInfoBox("No item found.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ void UpdatePositionBasedOnMouse(PointerEventContext mouse)
if (answer < 0)
break;
var resultIdx = int.Parse(resultEntries[answer].Item1);
currentSelection = resultIdx;
currentSelection = resultIdx - 1;
}
else
InfoBoxColor.WriteInfoBox("No item found.");
Expand Down

0 comments on commit 822e12b

Please sign in to comment.