From c5bd65d05bd4c54c9618d6559c4f9dba5a17c4e4 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Sun, 22 Aug 2021 14:06:46 +0600 Subject: [PATCH] chore: Add focused arg to statusline function (To make debugging easier) --- lua/lualine/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lualine/init.lua b/lua/lualine/init.lua index 4ba487d..1676254 100644 --- a/lua/lualine/init.lua +++ b/lua/lualine/init.lua @@ -260,11 +260,11 @@ local function reset_lualine() new_config = nil end -local function status_dispatch() +local function status_dispatch(focused) -- disable on specific filetypes if new_config then reset_lualine() end local current_ft = vim.bo.filetype - local is_focused = modules.utils.is_focused() + local is_focused = focused ~= nil and focused or modules.utils.is_focused() for _, ft in pairs(config.options.disabled_filetypes) do if ft == current_ft then vim.wo.statusline = ''