fix(tui): remove generic detail pane prefix
This commit is contained in:
parent
61b888cf3f
commit
d26af59f14
@ -1929,11 +1929,11 @@ func (m *model) syncDetailViewport() {
|
||||
}
|
||||
|
||||
func (m *model) configureDetailViewport(rect rect, lines []string) {
|
||||
title := m.detailPaneTitle() + " " + detailModeLabel(m.compactDetail)
|
||||
title := detailModeLabel(m.compactDetail)
|
||||
if focus := paneFocusLabel(m.focus == focusDetail); focus != "" {
|
||||
title += " " + focus
|
||||
}
|
||||
content := append([]string{paneTitleForWidth(focusDetail, m.focus, title, paneContentWidth(rect.w))}, lines...)
|
||||
content := append([]string{paneTitleWithLabelForWidth(m.detailPaneTitle(), focusDetail, m.focus, title, paneContentWidth(rect.w))}, lines...)
|
||||
m.detailView.Width = paneContentWidth(rect.w)
|
||||
m.detailView.Height = maxInt(1, rect.h-2)
|
||||
m.detailView.MouseWheelEnabled = true
|
||||
|
||||
@ -1108,7 +1108,7 @@ func TestDetailPaneTitleFollowsLayout(t *testing.T) {
|
||||
})
|
||||
chat.width = 160
|
||||
chat.height = 24
|
||||
if view := stripANSI(chat.View()); !strings.Contains(view, "Thread full") {
|
||||
if view := stripANSI(chat.View()); !strings.Contains(view, "Thread full") || strings.Contains(view, "Detail Thread full") {
|
||||
t.Fatalf("chat detail pane should be labeled as a thread:\n%s", view)
|
||||
}
|
||||
|
||||
@ -1119,7 +1119,7 @@ func TestDetailPaneTitleFollowsLayout(t *testing.T) {
|
||||
})
|
||||
doc.width = 160
|
||||
doc.height = 24
|
||||
if view := stripANSI(doc.View()); !strings.Contains(view, "Page full") {
|
||||
if view := stripANSI(doc.View()); !strings.Contains(view, "Page full") || strings.Contains(view, "Detail Page full") {
|
||||
t.Fatalf("document detail pane should be labeled as a page:\n%s", view)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user