From f38d4d0df55da231f3d987d7de0e20296eee3663 Mon Sep 17 00:00:00 2001 From: Alexander Pietz Date: Jun 17 2025 15:52:20 +0000 Subject: fix(textbox): Correct scrollbar positioning when NEWT_FLAG_SCROLL is enabled --- diff --git a/textbox.c b/textbox.c index b6fedd6..1b96d84 100644 --- a/textbox.c +++ b/textbox.c @@ -57,7 +57,7 @@ static void textboxPlace(newtComponent co, int newLeft, int newTop) { co->left = newLeft; if (tb->sb) { - tb->sb->ops->place(tb->sb, co->left + co->width - 1, co->top); + tb->sb->ops->place(tb->sb, co->left + co->width + 2, co->top); } } @@ -121,7 +121,7 @@ newtComponent newtTextbox(int left, int top, int width, int height, int flags) { if (flags & NEWT_FLAG_SCROLL) { co->width += 2; tb->sb = newtVerticalScrollbar(co->left + co->width - 1, co->top, - co->height, tb->cs, tb->cs); + co->height + 2, tb->cs, tb->cs); co->takesFocus = 1; } else { tb->sb = NULL;