fix: oil buffers remain unmodified after saving changes

This commit is contained in:
Steven Arcangeli 2023-03-23 21:18:46 -07:00
parent eea34329e8
commit 931453fc09
3 changed files with 63 additions and 2 deletions

View file

@ -120,6 +120,8 @@ M.rerender_all_oil_buffers = function(opts)
for _, bufnr in ipairs(buffers) do
if hidden_buffers[bufnr] then
vim.b[bufnr].oil_dirty = opts
-- We also need to mark this as nomodified so it doesn't interfere with quitting vim
vim.bo[bufnr].modified = false
else
M.render_buffer_async(bufnr, opts)
end