Skip to content

Commit 3f1631f

Browse files
committed
Merge branch 'dev'
2 parents af8ae3e + 6a246db commit 3f1631f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/easycomplete.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ function EasyComplete.replacement(abbr, positions, wrap_char)
307307
-- 转换为字符数组(字符串 -> 字符表)
308308
local letters = {}
309309
for i = 1, #abbr do
310-
letters[i] = abbr:sub(i, i)
310+
-- letters[i] = abbr:sub(i, i)
311+
letters[i] = vim.fn.strcharpart(abbr, i - 1, 1)
311312
end
312313
-- 对每个位置进行包裹处理
313314
for _, idx in ipairs(positions) do

0 commit comments

Comments
 (0)