Skip to content

Commit

Permalink
Fix wxtreme case
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Apr 3, 2024
1 parent beec2b1 commit 612a3f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private void wrapStringToWidthICU4J(String str, int wrapWidth, CallbackInfoRetur
switch (current) {
case '\n':
list.add(line.toString());
fed = i;
fed++;
line.delete(0, line.length()).append(format);
lineWidth = 0;
widths[i - fed] = lineWidth;
Expand Down Expand Up @@ -111,7 +111,7 @@ private void wrapStringToWidthICU4J(String str, int wrapWidth, CallbackInfoRetur
}
if (icui <= fed || i == icui) {
list.add(line.substring(0,line.length() - 1));
fed = i - 1;
fed = i;
line.delete(0, line.length()).append(format).append(current);
prevFormat = format.length();
lineWidth = getCharWidth(current);
Expand All @@ -120,7 +120,7 @@ private void wrapStringToWidthICU4J(String str, int wrapWidth, CallbackInfoRetur
if (line.charAt(d + prevFormat - 1) == '§') d--;
list.add(line.substring(0, d + prevFormat));
temp = line.substring(d + prevFormat);
fed = icui;
fed += d;
line.delete(0, line.length()).append(formats[d]).append(temp);
prevFormat = formats[d].length();
lineWidth = lineWidth - widths[d - 1];
Expand Down

0 comments on commit 612a3f6

Please sign in to comment.