Fix Quickfix/Location List statusmenu mode string

This commit is contained in:
Kenneth Benzie 2024-03-14 23:35:18 +00:00
parent 378c8b0be4
commit 6c0c906cb2

View File

@ -121,7 +121,11 @@ function statusline.active()
-- loclist flag, query the window info. -- loclist flag, query the window info.
local info = vim.fn.getwininfo(vim.fn.win_getid())[1] local info = vim.fn.getwininfo(vim.fn.win_getid())[1]
if mode == 'Normal' then if mode == 'Normal' then
if info.loclist then mode = 'Location' else mode = 'Quickfix' end if info.loclist == 1 then
mode = 'Location'
else
mode = 'Quickfix'
end
end end
local title = info.variables.quickfix_title local title = info.variables.quickfix_title
return special('StatusLineLight', mode, title) return special('StatusLineLight', mode, title)