Cap scroll to amount of visible lines, currently was capped to amount of lines + 1

This commit is contained in:
somehussar committed 2025-12-19 22:39:36 +01:00
1 parent aca9cec48c
commit 00eefb0887
1 file changed
+2 -2
@@ -277,8 +277,8 @@ public class GuiScriptTextArea extends GuiNpcTextField {
// Enable scissor test to clip drawing to the TEXT viewport rectangle (excludes gutter)
GL11.glEnable(GL11.GL_SCISSOR_TEST);
scissorViewport();
container.visibleLines = height / container.lineHeight-1;
container.visibleLines = (height / container.lineHeight);
int maxScroll = Math.max(0, this.container.linesCount - container.visibleLines);