# HG changeset patch # User Meredith Howard # Date 1678852597 18000 # Node ID bfcf9813c2232abfc8d04f738fce15b77d2329b5 # Parent 82f517e1ae76a1382792ad7153dddaa92419139d try to fix stopinsert/autowrite again 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 @@ -14,14 +14,12 @@ autocmd(g, "FocusGained", "*", cmd.check -- >> autowriteall improvment -- Stopinsert on leave, or autowriteall doesn't work. autocmd(g, { "WinLeave", "FocusLost" }, "*", function() - if not fn.pumvisible() then + if fn.pumvisible() == 0 then fn.stopinsert() end + cmd.wa() end) --- write all on leave -autocmd(g, "FocusLost", "*", cmd.wa) - -- >> auto mkpath on write autocmd(g, "BufWritePre", "*", { callback = function(ctx)