Finish settings TODO cleanup

This commit is contained in:
2026-05-18 10:05:26 +01:00
parent cadd4c8f64
commit f10598601f
8 changed files with 131 additions and 86 deletions

View File

@@ -505,7 +505,18 @@ func (st *uiState) dbgf(format string, args ...any) {
}
func (st *uiState) activeSummaryText(width int) string {
if width <= 0 || st.summaries == nil {
text := st.activeSummaryRaw()
if text == "" || width <= 0 {
return ""
}
if visibleLen(text) > width {
text = clipRunes(text, width-1) + "…"
}
return text
}
func (st *uiState) activeSummaryRaw() string {
if st.summaries == nil {
return ""
}
st.settingsMu.Lock()
@@ -525,9 +536,6 @@ func (st *uiState) activeSummaryText(width int) string {
if text == "" {
return ""
}
if visibleLen(text) > width {
text = clipRunes(text, width-1) + "…"
}
return text
}
@@ -1626,6 +1634,11 @@ func (st *uiState) processStdin(chunk []byte) {
adv = 1
}
i += adv
if action.kind == "settings-save" {
st.applySettingsAction(action)
st.renderPaletteLocked()
continue
}
if done {
a := action
pendingAction = &a