We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a4469b commit 62d618fCopy full SHA for 62d618f
1 file changed
lua/tabnine/utils.lua
@@ -1,6 +1,7 @@
1
local fn = vim.fn
2
local api = vim.api
3
-
+local unpack = table.unpack or unpack
4
+local pack = table.pack or vim.F.pack_len
5
local M = {}
6
local last_changedtick = vim.b.changedtick
7
@@ -11,7 +12,7 @@ function M.debounce(func, delay)
11
12
local timer_id
13
return function(...)
14
if timer_id then fn.timer_stop(timer_id) end
- local args = table.pack(...)
15
+ local args = pack(...)
16
timer_id = fn.timer_start(delay, function()
17
return func(unpack(args, 1, args.n))
18
end)
0 commit comments