Do not assume that each character takes at least 1 column

Fixes #2163, though this is not a proper fix to the problem.
pull/2224/head
Junegunn Choi 4 years ago
parent 2750e19657
commit 69dffd78a6
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -831,7 +831,7 @@ func wrapLine(input string, prefixLength int, max int, tabstop int) []wrappedLin
width := 0
line := ""
for _, r := range input {
w := util.Max(util.RuneWidth(r, prefixLength+width, 8), 1)
w := util.RuneWidth(r, prefixLength+width, 8)
width += w
str := string(r)
if r == '\t' {

Loading…
Cancel
Save