@@ -143,9 +143,11 @@ func (s *splashCmp) Init() tea.Cmd {
143143
144144// SetSize implements SplashPage.
145145func (s *splashCmp) SetSize(width int, height int) tea.Cmd {
146+ wasSmallScreen := s.isSmallScreen()
147+ rerenderLogo := width != s.width
146148 s.height = height
147− if width != s.width {
148− s.width = width
149+ s.width = width
150+ if rerenderLogo || wasSmallScreen != s.isSmallScreen() {
149151 s.logoRendered = s.logoBlock()
150152 }
151153 // remove padding, logo height, gap, title space
@@ -541,9 +543,19 @@ func (s *splashCmp) Cursor() *tea.Cursor {
541543 return nil
542544}
543545
546+func (s *splashCmp) isSmallScreen() bool {
547+ // Consider a screen small if either the width is less than 40 or if the
548+ // height is less than 20
549+ return s.width < 55 || s.height < 20
550+}
551+
544552func (s *splashCmp) infoSection() string {
545553 t := styles.CurrentTheme()
546− return t.S().Base.PaddingLeft(2).Render(
554+ infoStyle := t.S().Base.PaddingLeft(2)
555+ if s.isSmallScreen() {
556+ infoStyle = infoStyle.MarginTop(1)
557+ }
558+ return infoStyle.Render(
547559 lipgloss.JoinVertical(
548560 lipgloss.Left,
549561 s.cwd(),
@@ -556,14 +568,25 @@ func (s *splashCmp) infoSection() string {
556568
557569func (s *splashCmp) logoBlock() string {
558570 t := styles.CurrentTheme()
559− return t.S().Base.Padding(0, 2).Width(s.width).Render(
571+ logoStyle := t.S().Base.Padding(0, 2).Width(s.width)
572+ if s.isSmallScreen() {
573+ // If the width is too small, render a smaller version of the logo
574+ // NOTE: 20 is not correct because [splashCmp.height] is not the
575+ // *actual* window height, instead, it is the height of the splash
576+ // component and that depends on other variables like compact mode and
577+ // the height of the editor.
578+ return logoStyle.Render(
579+ logo.SmallRender(s.width - logoStyle.GetHorizontalFrameSize()),
580+ )
581+ }
582+ return logoStyle.Render(
560583 logo.Render(version.Version, false, logo.Opts{
561584 FieldColor: t.Primary,
562585 TitleColorA: t.Secondary,
563586 TitleColorB: t.Primary,
564587 CharmColor: t.Secondary,
565588 VersionColor: t.Primary,
566− Width: s.width - 4,
589+ Width: s.width - logoStyle.GetHorizontalFrameSize(),
567590 }),
568591 )
569592}