@@ -10,6 +10,7 @@ import (
1010 "charm.land/bubbles/v2/textinput"
1111 tea "charm.land/bubbletea/v2"
1212 "charm.land/catwalk/pkg/catwalk"
13+ "charm.land/lipgloss/v2"
1314 "github.com/charmbracelet/crush/internal/config"
1415 "github.com/charmbracelet/crush/internal/ui/common"
1516 "github.com/charmbracelet/crush/internal/ui/util"
@@ -265,9 +266,14 @@ func (m *Models) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
265266 t.Dialog.View.GetVerticalFrameSize()
266267
267268 m.input.SetWidth(max(0, innerWidth-t.Dialog.InputPrompt.GetHorizontalFrameSize()-1)) // (1) cursor padding
268− m.list.SetSize(innerWidth, height-heightOffset)
269269 m.help.SetWidth(innerWidth)
270270
271+ listHeight := height - heightOffset
272+ m.list.SetSize(innerWidth, listHeight)
273+ listTotalHeight := m.list.TotalHeight()
274+ listWidth := max(0, innerWidth-3) // Reserve space for scrollbar.
275+ m.list.SetSize(listWidth, listHeight)
276+
271277 rc := NewRenderContext(t, width)
272278 rc.Title = "Switch Model"
273279 rc.TitleInfo = m.modelTypeRadioView()
@@ -281,6 +287,10 @@ func (m *Models) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
281287 rc.AddPart(inputView)
282288
283289 listView := t.Dialog.List.Height(m.list.Height()).Render(m.list.Render())
290+ scrollbar := common.Scrollbar(t, listHeight, listTotalHeight, listHeight, m.list.Offset())
291+ if scrollbar != "" {
292+ listView = lipgloss.JoinHorizontal(lipgloss.Top, listView, scrollbar)
293+ }
284294 rc.AddPart(listView)
285295
286296 rc.Help = m.help.View(m)