Skip to content

Commit

Permalink
fix: hide nvim_exec_autocmds errors with pcall
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Apr 5, 2024
1 parent 244e9b3 commit 1736458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/astrocore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function M.exec_buffer_autocmds(event, opts)
for _, bufnr in ipairs(vim.t[tabpage].bufs or {}) do
if vim.bo[bufnr].filetype then
opts.buffer = bufnr
vim.api.nvim_exec_autocmds(event, opts)
pcall(vim.api.nvim_exec_autocmds, event, opts)
end
end
end
Expand Down

0 comments on commit 1736458

Please sign in to comment.