From 69dffd78a611e6cf5cfacb3edcddf2d45c787ff2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 23 Oct 2020 23:32:10 +0900 Subject: [PATCH] Do not assume that each character takes at least 1 column Fixes #2163, though this is not a proper fix to the problem. --- src/tui/light.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/light.go b/src/tui/light.go index 3062ab45..d051e67a 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -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' {