Fixed Script Editor text cursor not drawing on last line character

This commit is contained in:
bigguy345 committed 2025-12-17 10:45:45 +02:00
1 parent 3cbdab3dc4
commit 4ed809989d
1 file changed
+1 -1
@@ -170,7 +170,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
int yPos = y + (i - scrolledLine) * container.lineHeight + 1;
data.drawString(x + 1, yPos, 0xFFe0e0e0);
if (active && isEnabled() && (cursorCounter / 6) % 2 == 0 && cursorPosition >= data.start && cursorPosition < data.end) {
if (active && isEnabled() && (cursorCounter / 6) % 2 == 0 && cursorPosition >= data.start && cursorPosition <= data.end) {
int posX = x + ClientProxy.Font.width(line.substring(0, cursorPosition - data.start));
drawRect(posX + 1, yPos, posX + 2, yPos + 1 + container.lineHeight, -3092272);
}