mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 21:50:05 +08:00
15 lines
286 B
Lua
15 lines
286 B
Lua
local util = require "plenary.async.util"
|
|
|
|
return setmetatable({}, {
|
|
__index = function(t, k)
|
|
return function(...)
|
|
-- if we are in a fast event await the scheduler
|
|
if vim.in_fast_event() then
|
|
util.scheduler()
|
|
end
|
|
|
|
vim.api[k](...)
|
|
end
|
|
end,
|
|
})
|