Skip to content

Commit

Permalink
fix: ignore errors when unlocking buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc-stripe committed Jan 3, 2023
1 parent 7c662a5 commit e58f347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/oil/mutator/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ M.try_write_changes = function(confirm)
end
local function unlock()
for _, bufnr in ipairs(buffers) do
vim.bo[bufnr].modifiable = was_modifiable[bufnr]
pcall(vim.api.nvim_buf_set_option, bufnr, "modifiable", was_modifiable[bufnr])
end
end

Expand Down

0 comments on commit e58f347

Please sign in to comment.