test(messages/cmdline_spec): convert highlight IDs to name and format (#34845)

Problem:  Hardcoded highlight IDs for ext_messages/cmdline output need
          to be adjusted everytime a builtin highlight group is added.
Solution: Store a global map of default highlights through nvim_get_hl()
          and fetch missing (custom) highlight groups through synIDattr().
          Use more compact formatting for screen:expect().
This commit is contained in:
luukvbaal
2025-07-09 11:33:19 +02:00
committed by GitHub
parent 3c9484b550
commit 3a3484be29
6 changed files with 1037 additions and 1631 deletions

View File

@ -749,8 +749,8 @@ This UI extension delegates presentation of the |cmdline| (except 'wildmenu').
For command-line 'wildmenu' UI events, activate |ui-popupmenu|.
["cmdline_show", content, pos, firstc, prompt, indent, level, hl_id] ~
content: List of [attrs, string]
[[{}, "t"], [attrs, "est"], ...]
content: List of [attrs, string, hl_id]
[[{}, "t", hl_id], [attrs, "est", hl_id], ...]
Triggered when the cmdline is displayed or changed.
The `content` is the full content that should be displayed in the