some change
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-05-05 21:04:02 +02:00
parent 9bf57b4048
commit 177b080117

View File

@@ -109,7 +109,11 @@ func (m Model) CartView() string {
content := m.generateCartContent()
m.cart.viewport.SetContent(content)
if len(m.Cart) > 0 {
itemHeight := 5
boxPadding := 0
if m.heightContainer >= 25 {
boxPadding = 1
}
itemHeight := 4 + 2*boxPadding + 1
targetY := m.cart.cursor * itemHeight
if targetY < m.cart.viewport.YOffset {
m.cart.viewport.SetYOffset(targetY)