chore: Add focused arg to statusline function (To make debugging easier)

This commit is contained in:
shadmansaleh 2021-08-22 14:06:46 +06:00
parent c9c5e3f9d1
commit c5bd65d05b
1 changed files with 2 additions and 2 deletions

View File

@ -260,11 +260,11 @@ local function reset_lualine()
new_config = nil new_config = nil
end end
local function status_dispatch() local function status_dispatch(focused)
-- disable on specific filetypes -- disable on specific filetypes
if new_config then reset_lualine() end if new_config then reset_lualine() end
local current_ft = vim.bo.filetype 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 for _, ft in pairs(config.options.disabled_filetypes) do
if ft == current_ft then if ft == current_ft then
vim.wo.statusline = '' vim.wo.statusline = ''