mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix: timer is global too
This commit is contained in:
parent
ef37731877
commit
a74355f6a0
1 changed files with 4 additions and 3 deletions
|
@ -4,6 +4,7 @@ if CODEMP == nil then
|
||||||
rt = nil,
|
rt = nil,
|
||||||
session = nil,
|
session = nil,
|
||||||
native = nil,
|
native = nil,
|
||||||
|
timer = nil,
|
||||||
config = {
|
config = {
|
||||||
neo_tree = false,
|
neo_tree = false,
|
||||||
timer_interval = 100,
|
timer_interval = 100,
|
||||||
|
@ -43,9 +44,9 @@ if CODEMP == nil then
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if timer == nil then
|
if CODEMP.timer == nil then
|
||||||
timer = vim.loop.new_timer()
|
CODEMP.timer = vim.loop.new_timer()
|
||||||
timer:start(CODEMP.config.timer_interval, CODEMP.config.timer_interval, function()
|
CODEMP.timer:start(CODEMP.config.timer_interval, CODEMP.config.timer_interval, function()
|
||||||
while true do
|
while true do
|
||||||
local cb = CODEMP.native.poll_callback()
|
local cb = CODEMP.native.poll_callback()
|
||||||
if cb == nil then break end
|
if cb == nil then break end
|
||||||
|
|
Loading…
Reference in a new issue