fix: 修复了wrap计算错误

This commit is contained in:
JuanZoran
2023-01-14 14:22:25 +08:00
parent fdd4f23181
commit 273fb8d2c1
9 changed files with 118 additions and 79 deletions

View File

@@ -1,10 +1,23 @@
-- 记录开始时间
local starttime = os.clock(); --> os.clock()用法
for i = 1, 10, 2 do
print(i)
local function pw(str)
-- local res = vim.fn.strdisplaywidth(str)
local res = vim.fn.strwidth(str)
print(res)
end
pw('n. either extremity of something that has length')
pw('n.the point in time at which something ends')
pw('n.the concluding parts of an event or occurrence')
pw('n.a final part or section')
-- 48
-- 43
-- 48
-- 25
-- 记录结束时间
local endtime = os.clock(); --> os.clock()用法