fix(statusline): missing info/hint diagnostics #38307

Problem: default stl treat vim.diagnostics.count() return as array

Solution: next() tell if a dict is empty
This commit is contained in:
phanium
2026-03-15 22:35:08 +08:00
committed by GitHub
parent 9084483715
commit 0ca9849387
3 changed files with 3 additions and 3 deletions

View File

@@ -8786,7 +8786,7 @@ local options = {
"%{% &showcmdloc == 'statusline' ? '%-10.S ' : '' %}",
"%{% exists('b:keymap_name') ? '<'..b:keymap_name..'> ' : '' %}",
"%{% &busy > 0 ? '◐ ' : '' %}",
"%{% luaeval('(package.loaded[''vim.diagnostic''] and #vim.diagnostic.count() ~= 0 and vim.diagnostic.status() .. '' '') or '''' ') %}",
"%{% luaeval('(package.loaded[''vim.diagnostic''] and next(vim.diagnostic.count()) and vim.diagnostic.status() .. '' '') or '''' ') %}",
"%{% &ruler ? ( &rulerformat == '' ? '%-14.(%l,%c%V%) %P' : &rulerformat ) : '' %}",
}),
doc = 'is very long',