Revert "Every workspace split into real panes: 19 panes across 7 workspaces, one program per panel"

This reverts commit 32fa2752af.
This commit is contained in:
2026-11-10 16:40:14 +11:00
parent 32fa2752af
commit 851a15be74
19 changed files with 58 additions and 972 deletions

View File

@@ -289,28 +289,3 @@ func helpOverlay(title string, entries [][2]string, w, h int) string {
p := panel{title: title, width: boxW, height: boxH, focused: true}
return lipgloss.Place(w, h, lipgloss.Center, lipgloss.Center, p.render(lines))
}
// singlePanel draws one panel filling the whole pane: a title, optional tabs,
// a scrolling body, and one line of keys. It is what a pane shows when a
// workspace has been split into real panes instead of one program drawing
// several panels inside itself.
func singlePanel(title string, tabs []string, active int, body []string, w, h int, footer string, scroll int) string {
if w < 12 || h < 4 {
return fmt.Sprintf("this pane is %d × %d; it needs 12 × 4", w, h)
}
p := panel{title: title, tabs: tabs, active: active, width: w, height: h - 1, focused: true}
visible := p.bodyHeight()
maxScroll := max(0, len(body)-visible)
if scroll > maxScroll {
scroll = maxScroll
}
if scroll < 0 {
scroll = 0
}
from := scroll
to := min(len(body), from+visible)
if to < from {
to = from
}
return p.render(body[from:to]) + "\n" + truncateVisible(footer, w)
}