Skip to content

Commit

Permalink
fix(manager): schedule destroy (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
b0o committed Jan 23, 2024
1 parent 3c6db39 commit 67d950c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/incline/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ M.win_get_winline = function(win)
return tab:get_winline(win)
end

M.destroy = function()
local function destroy()
if not state.initialized then
return
end
Expand All @@ -100,6 +100,10 @@ M.destroy = function()
state.initialized = false
end

M.destroy = function()
vim.schedule(destroy)
end

M.setup = function()
if state.initialized then
M.update.threshold = config.debounce_threshold
Expand Down

0 comments on commit 67d950c

Please sign in to comment.