fix(api): cterm type in highlight keyset #37802

Problem: cterm field in Dict(highlight) is declared as Union(Integer, String)
but it actually expects a Dict(highlight_cterm).

Solution: change cterm type to DictAs(highlight__cterm) and simplify the
handling in dict2hlattrs since type validation and empty array compat are
already handled by api_dict_to_keydict.
This commit is contained in:
glepnir
2026-02-10 19:05:53 +08:00
committed by GitHub
parent 31c45f1aa4
commit b7070778b9
3 changed files with 4 additions and 12 deletions

View File

@@ -308,7 +308,7 @@ error('Cannot require a meta file')
--- @field altfont? boolean
--- @field nocombine? boolean
--- @field default? boolean
--- @field cterm? integer|string
--- @field cterm? vim.api.keyset.highlight_cterm
--- @field foreground? integer|string
--- @field fg? integer|string
--- @field background? integer|string