Finish settings TODO cleanup
This commit is contained in:
@@ -64,6 +64,7 @@ func (st *uiState) drawTabBar() {
|
||||
label string
|
||||
active bool
|
||||
}
|
||||
activeTab := -1
|
||||
|
||||
// Reserve space at the right edge for "+ new". If there are too
|
||||
// many tabs to fit even at minTabWidth, drop tabs from the right
|
||||
@@ -134,6 +135,9 @@ func (st *uiState) drawTabBar() {
|
||||
label: label,
|
||||
active: c.ID == focus,
|
||||
})
|
||||
if tabs[len(tabs)-1].active {
|
||||
activeTab = len(tabs) - 1
|
||||
}
|
||||
col += w
|
||||
}
|
||||
}
|
||||
@@ -195,8 +199,12 @@ func (st *uiState) drawTabBar() {
|
||||
hintCol, styleBorder, strings.Repeat("─", newHintW), styleReset)
|
||||
}
|
||||
|
||||
if summary := st.activeSummaryText(width - 2); summary != "" {
|
||||
fmt.Fprintf(&b, "\x1b[2;1H %s%s%s", styleDim, summary, styleReset)
|
||||
if activeTab >= 0 {
|
||||
tab := tabs[activeTab]
|
||||
summaryWidth := tab.width - 2
|
||||
if summary := st.activeSummaryText(summaryWidth); summary != "" {
|
||||
fmt.Fprintf(&b, "\x1b[2;%dH %s%s%s", tab.startCol, styleDim, summary, styleReset)
|
||||
}
|
||||
}
|
||||
|
||||
frame := b.String()
|
||||
|
||||
Reference in New Issue
Block a user