Skip to content

Commit

Permalink
Fix #306
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-D-coder committed Aug 14, 2023
1 parent dc45b3e commit 37f0363
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/treesitter-context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,7 @@ end

local function win_close(winid)
if winid ~= nil and api.nvim_win_is_valid(winid) then
-- pcall prevents the error described in #306
pcall(api.nvim_win_close, winid, true)
vim.schedule(function() api.nvim_win_close(winid, true) end)
end
end

Expand Down

0 comments on commit 37f0363

Please sign in to comment.