1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:50:05 +08:00

Fixed: fix string len parser (#2513)

Use strdisplay() instead of strlen.
This commit is contained in:
Lin Kun 2019-01-27 13:57:58 +08:00 committed by Wang Shidong
parent 7c2e7b7421
commit 771177f4d9

View File

@ -388,7 +388,7 @@ function! s:set_justification_to(align) abort
let l:lineList = map(getline(l:startlinenr, l:endlinenr), 'trim(v:val)')
let l:maxlength = 0
for l:line in l:lineList
let l:length = strlen(l:line)
let l:length = strdisplaywidth(l:line)
if l:length > l:maxlength
let l:maxlength = l:length
endif