···2727 helpStyle = lipgloss.NewStyle().
2828 Foreground(lipgloss.Color("241")).
2929 Background(lipgloss.Color("236")).
3030- Padding(0, 1)
3030+ Padding(0, 0)
31313232 statusBarStyle = lipgloss.NewStyle().
3333 Background(lipgloss.Color("236")).
···153153 m.width = msg.Width
154154 m.height = msg.Height
155155156156- headerHeight := 3
156156+ headerHeight := 1
157157 footerHeight := 1
158158 verticalMarginHeight := headerHeight + footerHeight
159159···345345 headerStyled := statusBarStyle.Width(m.width).Render(header)
346346347347 // Footer with scroll info only
348348+ // TODO: maybe add snapshot file name to footer?
348349 scrollInfo := fmt.Sprintf("%3.f%%", m.viewport.ScrollPercent()*100)
349350 scrollStyled := helpStyle.Render(scrollInfo)
350351351352 // Create footer with just scroll info on the right
352352- footer := lipgloss.JoinHorizontal(lipgloss.Left,
353353+ footer := lipgloss.JoinHorizontal(lipgloss.Bottom,
353354 strings.Repeat(" ", max(m.width-lipgloss.Width(scrollStyled)-1, 0)),
354355 scrollStyled,
355356 )
356357 footerStyled := statusBarStyle.Width(m.width).Render(footer)
357358358359 // Viewport content
360360+ // TODO: it would be nice if we could show the input on the right side?
361361+ // - (probably optionally, with a keybind -- hidden by default)
359362 viewportContent := m.viewport.View()
360360-361361- // Calculate how much vertical space we have
362362- // Total height = terminal height
363363- // Used by header = ~1 line (the rendered header)
364364- // Used by footer = ~1 line
365365- // Middle = viewport (takes remaining space)
366363367364 return lipgloss.JoinVertical(
368365 lipgloss.Left,
+1-1
internal/diff/diff.go
···11package diff
2233/*
44-This file was sourced from github.com/gkampitakis/go-snaps, available with the following License
44+This file was sourced from github.com/gkampitakis/go-snaps, available with the following License:
5566MIT License
77