Skip to content

Commit 2b974b4

Browse files
committed
fix(util): vim.fn.strutf16len existence check
1 parent 1500498 commit 2b974b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/copilot/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ function M.strutf16len(str)
300300
return vim.fn.strchars(vim.fn.substitute(str, [==[\\%#=2[^\u0001-\uffff]]==], " ", "g"))
301301
end
302302

303-
if vim.fn.strutf16len then
303+
if vim.fn.exists("*strutf16len") == 1 then
304304
M.strutf16len = vim.fn.strutf16len
305305
end
306306

0 commit comments

Comments
 (0)