Skip to content
Myr

Truncate wrap sign in the list section if necessary

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 3347d61 · Browse files · 1 file+9 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−2 removed

  • other:+9 added−2 removed

1 file+9 added−2 removed

modified:src/terminal.go+9 added-2 removed
3097 unmodified lines
30983099 maxWidth := t.window.Width() - (indentSize + 1)3100 wasWrapped := false3101 if wrapped {3102 maxWidth -= t.wrapSignWidth3103 t.window.CPrint(colBase.WithAttr(tui.Dim), t.wrapSign)3102 wrapSign := t.wrapSign3103 if maxWidth < t.wrapSignWidth {3104 runes, _ := util.Truncate(wrapSign, maxWidth)3105 wrapSign = string(runes)3106 maxWidth = 03107 } else {3108 maxWidth -= t.wrapSignWidth3109 }3110 t.window.CPrint(colBase.WithAttr(tui.Dim), wrapSign)3111 wrapped = false3112 wasWrapped = true3113 }3114
3169 unmodified lines