Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
don't render scope for unnamed var, fix value highlighting bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
homchom committed Dec 18, 2023
1 parent aeb95d3 commit b262c66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void renderSelectedItemName(GuiGraphics guiGraphics, CallbackInfo callbac
guiGraphics.drawString(font, nameText, x1, y1, 0xffffff, true);

var lore = ItemExtensions.lore(lastToolHighlight);
if (!lore.isEmpty()) {
if (lore.size() == 1) {
var scope = TextInterop.toVanilla(lore.get(0));
var x2 = (scaledWidth - font.width(scope)) / 2;
var y2 = scaledHeight - 35;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ fun FormattedCharSequence.subSequence(startIndex: Int, endIndex: Int) = Formatte
/**
* @see CharSequence.subSequence
*/
fun FormattedCharSequence.subSequence(range: IntRange) = subSequence(range.first, range.last)
fun FormattedCharSequence.subSequence(range: IntRange) = subSequence(range.first, range.last + 1)

0 comments on commit b262c66

Please sign in to comment.