Finish settings TODO cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user