From 4d6362499f9d86a9ddde6ff5a5abf4411d57c492 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Wed, 13 Aug 2025 16:19:35 +0300 Subject: [PATCH] fix: add top padding --- internal/tui/components/chat/chat.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/tui/components/chat/chat.go b/internal/tui/components/chat/chat.go index d81e047051ecc6160d06483e5c5b3cf4186149de..8688f7e24c94290c74ae4344499acff61b43ac39 100644 --- a/internal/tui/components/chat/chat.go +++ b/internal/tui/components/chat/chat.go @@ -224,7 +224,7 @@ func (m *messageListCmp) View() string { t := styles.CurrentTheme() height := m.height if m.promptQueue > 0 { - height -= 3 + height -= 4 // pill height and padding } view := []string{ t.S().Base. @@ -237,7 +237,7 @@ func (m *messageListCmp) View() string { } if m.app.CoderAgent != nil && m.promptQueue > 0 { queuePill := queuePill(m.promptQueue, t) - view = append(view, t.S().Base.PaddingLeft(4).Render(queuePill)) + view = append(view, t.S().Base.PaddingLeft(4).PaddingTop(1).Render(queuePill)) } return strings.Join(view, "\n") } @@ -657,10 +657,11 @@ func (m *messageListCmp) SetSize(width int, height int) tea.Cmd { m.width = width m.height = height if m.promptQueue > 0 { - queueHeight := 3 - return m.listCmp.SetSize(width-2, height-(1+queueHeight)) + queueHeight := 3 + 1 // 1 for padding top + lHight := max(0, height-(1+queueHeight)) + return m.listCmp.SetSize(width-2, lHight) } - return m.listCmp.SetSize(width-2, height-1) // for padding + return m.listCmp.SetSize(width-2, max(0, height-1)) // for padding } // Blur implements MessageListCmp.