From 9c718bc2bce53b5be45061bff940f99e50c8bfcb Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Sun, 17 Nov 2024 00:36:11 +0100 Subject: fix(api): validation, documentation of hl_group #31195 Problem: Documentation for "hl_group" in nvim_buf_set_extmark() is unclear. "hl_group" in nvim_echo() does not accept highlight group id. Solution: Move documentation for highlight group name/id to first mention of hl_group. Update nvim_echo() to accept highlight group id. --- src/nvim/api/vim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/api/vim.c') diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 199b9a9690..89e974c098 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -779,8 +779,8 @@ void nvim_set_vvar(String name, Object value, Error *err) /// Echo a message. /// /// @param chunks A list of `[text, hl_group]` arrays, each representing a -/// text chunk with specified highlight. `hl_group` element -/// can be omitted for no highlight. +/// text chunk with specified highlight group name or ID. +/// `hl_group` element can be omitted for no highlight. /// @param history if true, add to |message-history|. /// @param opts Optional parameters. /// - verbose: Message is printed as a result of 'verbose' option. -- cgit