Cleanup unused arg in statusline implementation

This commit is contained in:
Kenneth Benzie (Benie) 2024-05-24 16:04:23 +01:00
parent 9d5868304f
commit aba1664d09

View File

@ -75,7 +75,7 @@ local function special(group, name, title)
end
-- Construct a statusline for generic buffer types.
local function generic(group, name, show_lsp)
local function generic(group, name)
-- Display current mode with dynamic highlights.
local line = '%#' .. group .. '# ' .. name .. ' '
-- Display spell or paste if set with dusk highlights in a group to swallow
@ -131,11 +131,11 @@ function _G.statusline_active()
return special('StatusLineLight', 'Terminal', '%f')
elseif vim.o.previewwindow then
if mode == 'Normal' then mode = 'Preview' end
return generic('StatusLineLight', mode, false)
return generic('StatusLineLight', mode)
elseif vim.o.filetype == 'man' then
return special('StatusLineDusk', 'Manual', '%f')
end
return generic('StatusLineLight', mode, true)
return generic('StatusLineLight', mode)
end
function _G.statusline_inactive()
@ -152,11 +152,11 @@ function _G.statusline_inactive()
elseif vim.o.buftype == 'terminal' then
line = special('StatusLineDusk', 'Terminal', '%f')
elseif vim.o.previewwindow then
line = generic('StatusLineDusk', 'Preview', false)
line = generic('StatusLineDusk', 'Preview')
elseif vim.o.filetype == 'man' then
line = special('StatusLineDusk', 'Manual', '%f')
else
line = generic('StatusLineDusk', 'Idle', false)
line = generic('StatusLineDusk', 'Idle')
end
return line
end