Cleanup unused arg in statusline implementation
This commit is contained in:
parent
9d5868304f
commit
aba1664d09
@ -75,7 +75,7 @@ local function special(group, name, title)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Construct a statusline for generic buffer types.
|
-- 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.
|
-- Display current mode with dynamic highlights.
|
||||||
local line = '%#' .. group .. '# ' .. name .. ' '
|
local line = '%#' .. group .. '# ' .. name .. ' '
|
||||||
-- Display spell or paste if set with dusk highlights in a group to swallow
|
-- 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')
|
return special('StatusLineLight', 'Terminal', '%f')
|
||||||
elseif vim.o.previewwindow then
|
elseif vim.o.previewwindow then
|
||||||
if mode == 'Normal' then mode = 'Preview' end
|
if mode == 'Normal' then mode = 'Preview' end
|
||||||
return generic('StatusLineLight', mode, false)
|
return generic('StatusLineLight', mode)
|
||||||
elseif vim.o.filetype == 'man' then
|
elseif vim.o.filetype == 'man' then
|
||||||
return special('StatusLineDusk', 'Manual', '%f')
|
return special('StatusLineDusk', 'Manual', '%f')
|
||||||
end
|
end
|
||||||
return generic('StatusLineLight', mode, true)
|
return generic('StatusLineLight', mode)
|
||||||
end
|
end
|
||||||
|
|
||||||
function _G.statusline_inactive()
|
function _G.statusline_inactive()
|
||||||
@ -152,11 +152,11 @@ function _G.statusline_inactive()
|
|||||||
elseif vim.o.buftype == 'terminal' then
|
elseif vim.o.buftype == 'terminal' then
|
||||||
line = special('StatusLineDusk', 'Terminal', '%f')
|
line = special('StatusLineDusk', 'Terminal', '%f')
|
||||||
elseif vim.o.previewwindow then
|
elseif vim.o.previewwindow then
|
||||||
line = generic('StatusLineDusk', 'Preview', false)
|
line = generic('StatusLineDusk', 'Preview')
|
||||||
elseif vim.o.filetype == 'man' then
|
elseif vim.o.filetype == 'man' then
|
||||||
line = special('StatusLineDusk', 'Manual', '%f')
|
line = special('StatusLineDusk', 'Manual', '%f')
|
||||||
else
|
else
|
||||||
line = generic('StatusLineDusk', 'Idle', false)
|
line = generic('StatusLineDusk', 'Idle')
|
||||||
end
|
end
|
||||||
return line
|
return line
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user