fix: account for status bar height when sizing viewport

This commit is contained in:
Levi Neely 2026-04-05 11:18:53 +02:00
parent 1c9d180d35
commit 37fc5ee968
1 changed files with 2 additions and 2 deletions

View File

@ -632,10 +632,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.WindowSizeMsg:
// Reserve 1 row for the status bar, 5 for the textarea.
m.viewport.Width = msg.Width
m.viewport.Height = msg.Height - 5 - 1
m.textarea.SetWidth(msg.Width)
barHeight := lipgloss.Height(m.renderStatusBar())
m.viewport.Height = msg.Height - m.textarea.Height() - barHeight
m.refreshView()
m.ready = true