Skip to content
Myr

Do not assume that each character takes at least 1 column

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

Fixes #2163, though this is not a proper fix to the problem.

authored by Junegunn Choi · committed by Junegunn Choi · parent 2750e19 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/tui/light.go+1 added-1 removed
829 unmodified lines
830 lines := []wrappedLine{}831 width := 0832 line := ""833 for _, r := range input {834 w := util.Max(util.RuneWidth(r, prefixLength+width, 8), 1)834 w := util.RuneWidth(r, prefixLength+width, 8)835 width += w836 str := string(r)837 if r == '\t' {838 str = repeat(' ', w)
81 unmodified lines