mirror of
https://github.com/junegunn/fzf
synced 2024-11-10 13:10:44 +00:00
Make util.RuneWidth return 1 for non-displayable characters
Fix line wrapping in preview window
This commit is contained in:
parent
a16d8f66a9
commit
6c6c0a4778
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user