feat: a revealed value shows where its dots were, keys below
CI / Checks (pull_request) Successful in 22s
PR title / Conventional title (pull_request) Successful in 1s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-11 10:36:10 +02:00
1 parent c04ad389ee
commit e31716cb1d
1 file changed
+13 -6
+13 -6
View File
@@ -333,16 +333,23 @@ func (d Detail) lines(st styles.Styles) []string {
} }
} }
case ValueShown: case ValueShown:
// Where the dots were, continuing under itself; the keys below.
first := true
for _, line := range strings.Split(d.value.Reveal(), "\n") {
for _, w := range strings.Split(ansi.Hardwrap(line, max(1, inner-11), true), "\n") {
if first {
out = append(out, " "+st.Label.Render(fmt.Sprintf("%-10s", label))+" "+st.Value.Render(w))
first = false
} else {
out = append(out, indent+st.Value.Render(w))
}
}
}
var more []string var more []string
if d.hidesIn != "" { if d.hidesIn != "" {
more = append(more, "hides in "+d.hidesIn) more = append(more, "hides in "+d.hidesIn)
} }
out = append(out, " "+st.Label.Render(fmt.Sprintf("%-10s", label))+" "+hints("hide", more...)) out = append(out, indent+hints("hide", more...))
for _, line := range strings.Split(d.value.Reveal(), "\n") {
for _, w := range strings.Split(ansi.Hardwrap(line, inner, true), "\n") {
out = append(out, " "+st.Value.Render(w))
}
}
} }
return append(out, d.versionLines(st)...) return append(out, d.versionLines(st)...)
} }