From efe72d98e6fb71252bd9a904c00a40ccd54ebf05 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Jan 2023 12:37:28 +0100 Subject: [PATCH] perf(util): properly check that Neovim is exiting. Dont run VeryLazy when that's the case --- lua/lazy/core/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index 5173520d..3a27a8fc 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -142,9 +142,9 @@ end function M.very_lazy() local function _load() vim.schedule(function() - -- if vim.v.exiting then - -- return - -- end + if vim.v.exiting ~= vim.NIL then + return + end vim.g.did_very_lazy = true vim.api.nvim_exec_autocmds("User", { pattern = "VeryLazy", modeline = false }) end)