on main help sign in
chore: fix cursor
6d6ef4dKujtim Hoxha
internal/tui/components/chat/splash/splash.go+3−3
@@ -134,7 +134,8 @@ func (s *splashCmp) SetSize(width int, height int) tea.Cmd {
134 s.width = width
134 s.width = width
135 s.logoRendered = s.logoBlock()
135 s.logoRendered = s.logoBlock()
136 }
136 }
137+ infoSectionHeight := lipgloss.Height(s.infoSection())
137− listHeigh := min(40, height-(SplashScreenPaddingY*2)-lipgloss.Height(s.logoRendered)-2) // -1 for the title
138+ listHeigh := min(40, height-(SplashScreenPaddingY*2)-lipgloss.Height(s.logoRendered)-2-infoSectionHeight)
138 listWidth := min(60, width-(SplashScreenPaddingX*2))
139 listWidth := min(60, width-(SplashScreenPaddingX*2))
139
140
140 return s.modelList.SetSize(listWidth, listHeigh)
141 return s.modelList.SetSize(listWidth, listHeigh)
@@ -490,7 +491,6 @@ func (m *splashCmp) moveCursor(cursor *tea.Cursor) *tea.Cursor {
490 if cursor == nil {
491 if cursor == nil {
491 return nil
492 return nil
492 }
493 }
493−
494 // Calculate the correct Y offset based on current state
494 // Calculate the correct Y offset based on current state
495 logoHeight := lipgloss.Height(m.logoRendered)
495 logoHeight := lipgloss.Height(m.logoRendered)
496 infoSectionHeight := lipgloss.Height(m.infoSection())
496 infoSectionHeight := lipgloss.Height(m.infoSection())
@@ -502,7 +502,7 @@ func (m *splashCmp) moveCursor(cursor *tea.Cursor) *tea.Cursor {
502 cursor.X = cursor.X + SplashScreenPaddingX
502 cursor.X = cursor.X + SplashScreenPaddingX
503 } else if m.isOnboarding {
503 } else if m.isOnboarding {
504 listHeight := min(40, m.height-(SplashScreenPaddingY)-baseOffset)
504 listHeight := min(40, m.height-(SplashScreenPaddingY)-baseOffset)
505− offset := m.height - listHeight + 1 // +1 for the title
505+ offset := m.height - listHeight + 2
506 cursor.Y += offset
506 cursor.Y += offset
507 cursor.X = cursor.X + SplashScreenPaddingX + 1
507 cursor.X = cursor.X + SplashScreenPaddingX + 1
508 }
508 }