Change summary
internal/ui/common/scrollbar.go | 2 +-
internal/ui/dialog/models.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Detailed changes
@@ -23,7 +23,7 @@ func Scrollbar(s *styles.Styles, height, contentSize, viewportSize, offset int)
}
// Calculate where the thumb starts.
- trackSpace := height - thumbSize + 1
+ trackSpace := height - thumbSize
thumbPos := 0
if trackSpace > 0 && maxOffset > 0 {
thumbPos = min(trackSpace, offset*trackSpace/maxOffset)
@@ -287,7 +287,7 @@ func (m *Models) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
rc.AddPart(inputView)
listView := t.Dialog.List.Height(m.list.Height()).Render(m.list.Render())
- scrollbar := common.Scrollbar(t, listHeight, listTotalHeight, listHeight, m.list.Offset())
+ scrollbar := common.Scrollbar(t, listHeight, listTotalHeight, listHeight+1, m.list.Offset())
if scrollbar != "" {
listView = lipgloss.JoinHorizontal(lipgloss.Top, listView, scrollbar)
}