From 76737a97e44aec2c8a86ad4db0e88e1cfc094125 Mon Sep 17 00:00:00 2001 From: Brian Koropoff Date: Sun, 7 Jul 2024 16:46:00 -0700 Subject: [PATCH] core:config: fix issue #1626 Check whether nvim is currently headless, not whether it was headless at startup. --- lua/lazy/core/config.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 083db1c..cac0e57 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -253,9 +253,8 @@ M.mapleader = nil ---@type string M.maplocalleader = nil -local headless = #vim.api.nvim_list_uis() == 0 function M.headless() - return headless + return #vim.api.nvim_list_uis() == 0 end ---@param opts? LazyConfig