repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
c3c3ade
parent
5e4c326
author
Eric Bower
date
2026-01-16 19:45:17 -0500 EST
fix(tui): border boundaries
1 files changed,  +16, -2
M pkg/tui/border.go
+16, -2
 1@@ -90,11 +90,25 @@ func (b *Border) HandleEvent(vaxis.Event, vxfw.EventPhase) (vxfw.Command, error)
 2 }
 3 
 4 func (b *Border) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
 5+	// Ensure minimum bounds for child widget
 6+	maxWidth := ctx.Max.Width
 7+	maxHeight := ctx.Max.Height
 8+	if maxWidth > 2 {
 9+		maxWidth = maxWidth - 2
10+	} else {
11+		maxWidth = 1
12+	}
13+	if maxHeight > 3 {
14+		maxHeight = maxHeight - 3
15+	} else if maxHeight > 0 {
16+		maxHeight = 1
17+	}
18+
19 	surf, _ := b.w.Draw(vxfw.DrawContext{
20 		Characters: ctx.Characters,
21 		Max: vxfw.Size{
22-			Width:  ctx.Max.Width - 2,
23-			Height: ctx.Max.Height - 3,
24+			Width:  maxWidth,
25+			Height: maxHeight,
26 		},
27 	})
28