Detail panes: keep a margin between the poster and the text

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 22:06:53 +02:00
co-authored by Claude Sonnet 5.5
parent b1e368418b
commit fa7e77c56d
2 changed files with 11 additions and 5 deletions
+6 -4
View File
@@ -84,12 +84,14 @@ func TestDetailPaneFlowsAroundPoster(t *testing.T) {
if got := rowText(screen, 4, 1, 30); !strings.HasPrefix(got, "plot plot") {
t.Errorf("the plot starts beside the poster, right after the head: %q", got)
}
// Beside the poster the text stays left of it (34 columns), below it it uses the full width.
for y := 1; y <= d.coverH; y++ {
if got := strings.TrimRight(rowText(screen, y, 1, 35), " "); len([]rune(got)) > 34 {
t.Errorf("row %d runs into the poster: %q", y, got)
// Beside the poster the text stays left of it with a gap of two columns
// (58-23-2 = 33 columns), and the row right under the poster is kept clear too.
for y := 1; y <= d.coverH+coverGapRows; y++ {
if got := strings.TrimRight(rowText(screen, y, 1, 36), " "); len([]rune(got)) > 33 {
t.Errorf("row %d runs into the poster's margin: %q", y, got)
}
}
// Further down it uses the full width.
if got := strings.TrimSpace(rowText(screen, d.coverH+3, 1, 59)); len(got) < 50 {
t.Errorf("below the poster the text should use the full width: %q", got)
}