File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ local cwd = (function()
11
11
return vim .api .nvim_call_function (" fnamemodify" , {file , " :p:h:h" })
12
12
end )()
13
13
14
+ local loop = vim .uv or vim .loop
15
+
14
16
local function defer (timeout , callback )
15
- local timer = vim . loop .new_timer ()
17
+ local timer = loop .new_timer ()
16
18
timer :start (
17
19
timeout ,
18
20
0 ,
@@ -145,7 +147,7 @@ local set_chad_call = function(cmd)
145
147
chad [cmd ] = function (...)
146
148
local args = {... }
147
149
if t1 == 0 then
148
- t1 = vim . loop .now ()
150
+ t1 = loop .now ()
149
151
end
150
152
151
153
if not job_id then
@@ -164,7 +166,7 @@ local set_chad_call = function(cmd)
164
166
165
167
if not err_exit and CHAD [cmd ] then
166
168
CHAD [cmd ](args )
167
- local t2 = vim . loop .now ()
169
+ local t2 = loop .now ()
168
170
if settings ().profiling and t1 >= 0 then
169
171
print (" Init " .. (t2 - t1 ) .. " ms" )
170
172
end
You can’t perform that action at this time.
0 commit comments