diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-09 10:45:05 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-09 10:49:05 +0900 |
commit | 6c6c0a47782328d21cc2899ac9c9f0e6edb1fb40 (patch) | |
tree | fd3e23a3de5ed9e1a9c63a9044fdc3070d52dfd9 /src/util | |
parent | a16d8f66a99ae365a57d114d5ee7d0a7ebc4cf5f (diff) |
Make util.RuneWidth return 1 for non-displayable characters
Fix line wrapping in preview window
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/util.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/util.go b/src/util/util.go index 29e80176..15ec0ad8 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -18,7 +18,7 @@ func RuneWidth(r rune, prefixWidth int, tabstop int) int { } else if w, found := _runeWidths[r]; found { return w } else { - w := runewidth.RuneWidth(r) + w := Max(runewidth.RuneWidth(r), 1) _runeWidths[r] = w return w } |