Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lua/oil/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,19 @@ local pending_renders = {}
---@param opts nil|table
--- refetch nil|boolean Defaults to true
---@param callback nil|fun(err: nil|string)
M.render_buffer_async = function(bufnr, opts, callback)
M.render_buffer_async = function(bufnr, opts, caller_callback)
local function callback(err)
if not err then
vim.api.nvim_exec_autocmds(
"User",
{ pattern = "OilReadPost", modeline = false, data = { buf = bufnr } }
)
end
if caller_callback then
caller_callback(err)
end
end

opts = vim.tbl_deep_extend("keep", opts or {}, {
refetch = true,
})
Expand Down