mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Fixed: fix string len parser (#2513)
Use strdisplay() instead of strlen.
This commit is contained in:
parent
7c2e7b7421
commit
771177f4d9
@ -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:lineList = map(getline(l:startlinenr, l:endlinenr), 'trim(v:val)')
|
||||||
let l:maxlength = 0
|
let l:maxlength = 0
|
||||||
for l:line in l:lineList
|
for l:line in l:lineList
|
||||||
let l:length = strlen(l:line)
|
let l:length = strdisplaywidth(l:line)
|
||||||
if l:length > l:maxlength
|
if l:length > l:maxlength
|
||||||
let l:maxlength = l:length
|
let l:maxlength = l:length
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user