# HG changeset patch # User Meredith Howard # Date 1695161520 18000 # Node ID 1bd6edeaf6ae522edc26b05ba6526855dae92415 # Parent 30d81fbc6a7b25db9891a8ebcaa37c91697484c9 fix error when unnamed buffers can't be written diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua --- a/.config/nvim/lua/config/autocmds.lua +++ b/.config/nvim/lua/config/autocmds.lua @@ -17,7 +17,7 @@ autocmd(g, { "WinLeave", "FocusLost" }, if fn.pumvisible() == 0 then cmd.stopinsert() end - cmd.wa() + pcall(cmd.wa) end) -- >> auto mkpath on write